brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 8ff7e95 Raw
46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=mergeicmps -verify-dom-info -S | FileCheck %s3 4target triple = "x86_64"5 6; This is very much not an x86 ABI, in current use, but we're testing7; that we've fixed a bug where accumulateConstantOffset() was called incorrectly.8target datalayout = "e-p:64:64:64:32"9 10; Define a cunstom data layout that has index width < pointer width11; and make sure that doesn't break anything12define void @fat_ptrs(ptr dereferenceable(16) %a, ptr dereferenceable(16) %b) {13; CHECK-LABEL: @fat_ptrs(14; CHECK-NEXT:  bb0:15; CHECK-NEXT:    [[PTR_A1:%.*]] = getelementptr inbounds [2 x i64], ptr [[A:%.*]], i32 0, i32 116; CHECK-NEXT:    [[PTR_B1:%.*]] = getelementptr inbounds [2 x i64], ptr [[B:%.*]], i32 0, i32 117; CHECK-NEXT:    br label %"bb1+bb2"18; CHECK:       "bb1+bb2":19; CHECK-NEXT:    [[MEMCMP:%.*]] = call i32 @memcmp(ptr [[A]], ptr [[B]], i32 16)20; CHECK-NEXT:    [[TMP0:%.*]] = icmp eq i32 [[MEMCMP]], 021; CHECK-NEXT:    br label [[BB3:%.*]]22; CHECK:       bb3:23; CHECK-NEXT:    ret void24;25bb0:26  %ptr_a1 = getelementptr inbounds [2 x i64], ptr %a, i32 0, i32 127  %ptr_b1 = getelementptr inbounds [2 x i64], ptr %b, i32 0, i32 128  br label %bb129 30bb1:                                              ; preds = %bb031  %a0 = load i64, ptr %a32  %b0 = load i64, ptr %b33  %cond0 = icmp eq i64 %a0, %b034  br i1 %cond0, label %bb2, label %bb335 36bb2:                                              ; preds = %bb137  %a1 = load i64, ptr %ptr_a138  %b1 = load i64, ptr %ptr_b139  %cond1 = icmp eq i64 %a1, %b140  br label %bb341 42bb3:                                              ; preds = %bb2, %bb143  %necessary = phi i1 [ %cond1, %bb2 ], [ false, %bb1 ]44  ret void45}46