diff options
Diffstat (limited to 'test/Transforms/IRCE')
-rw-r--r-- | test/Transforms/IRCE/bug-loop-varying-upper-limit.ll | 31 | ||||
-rw-r--r-- | test/Transforms/IRCE/decrementing-loop.ll | 4 | ||||
-rw-r--r-- | test/Transforms/IRCE/low-becount.ll | 4 | ||||
-rw-r--r-- | test/Transforms/IRCE/multiple-access-no-preloop.ll | 8 | ||||
-rw-r--r-- | test/Transforms/IRCE/not-likely-taken.ll | 8 | ||||
-rw-r--r-- | test/Transforms/IRCE/only-lower-check.ll | 37 | ||||
-rw-r--r-- | test/Transforms/IRCE/only-upper-check.ll | 37 | ||||
-rw-r--r-- | test/Transforms/IRCE/single-access-no-preloop.ll | 10 | ||||
-rw-r--r-- | test/Transforms/IRCE/single-access-with-preloop.ll | 4 | ||||
-rw-r--r-- | test/Transforms/IRCE/unhandled.ll | 4 | ||||
-rw-r--r-- | test/Transforms/IRCE/with-parent-loops.ll | 36 |
11 files changed, 144 insertions, 39 deletions
diff --git a/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll b/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll new file mode 100644 index 0000000..4635bb4 --- /dev/null +++ b/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll @@ -0,0 +1,31 @@ +; RUN: opt -irce-print-changed-loops -S -irce -verify < %s 2>&1 | FileCheck %s + +; CHECK-NOT: constrained loop + +define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 %n) { + entry: + %first.itr.check = icmp sgt i32 %n, 0 + br i1 %first.itr.check, label %loop, label %exit + + loop: + %idx = phi i32 [ 0, %entry ] , [ %idx.next, %in.bounds ] + %idx.next = add i32 %idx, 1 + %len = load i32, i32* %a_len_ptr, !range !0 + %abc = icmp slt i32 %idx, %len + br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 + + in.bounds: + %addr = getelementptr i32, i32* %arr, i32 %idx + store i32 0, i32* %addr + %next = icmp slt i32 %idx.next, %n + br i1 %next, label %loop, label %exit + + out.of.bounds: + ret void + + exit: + ret void +} + +!0 = !{i32 0, i32 2147483647} +!1 = !{!"branch_weights", i32 64, i32 4} diff --git a/test/Transforms/IRCE/decrementing-loop.ll b/test/Transforms/IRCE/decrementing-loop.ll index 877a2c2..6ff3e76 100644 --- a/test/Transforms/IRCE/decrementing-loop.ll +++ b/test/Transforms/IRCE/decrementing-loop.ll @@ -2,7 +2,7 @@ define void @decrementing_loop(i32 *%arr, i32 *%a_len_ptr, i32 %n) { entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 %start = sub i32 %n, 1 br i1 %first.itr.check, label %loop, label %exit @@ -16,7 +16,7 @@ define void @decrementing_loop(i32 *%arr, i32 *%a_len_ptr, i32 %n) { br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 in.bounds: - %addr = getelementptr i32* %arr, i32 %idx + %addr = getelementptr i32, i32* %arr, i32 %idx store i32 0, i32* %addr %next = icmp sgt i32 %idx.dec, -1 br i1 %next, label %loop, label %exit diff --git a/test/Transforms/IRCE/low-becount.ll b/test/Transforms/IRCE/low-becount.ll index 2ddaf19..89b91d6 100644 --- a/test/Transforms/IRCE/low-becount.ll +++ b/test/Transforms/IRCE/low-becount.ll @@ -4,7 +4,7 @@ define void @low_profiled_be_count(i32 *%arr, i32 *%a_len_ptr, i32 %n) { entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -15,7 +15,7 @@ define void @low_profiled_be_count(i32 *%arr, i32 *%a_len_ptr, i32 %n) { br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 in.bounds: - %addr = getelementptr i32* %arr, i32 %idx + %addr = getelementptr i32, i32* %arr, i32 %idx store i32 0, i32* %addr %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit, !prof !2 diff --git a/test/Transforms/IRCE/multiple-access-no-preloop.ll b/test/Transforms/IRCE/multiple-access-no-preloop.ll index 304bb4d..9963a57 100644 --- a/test/Transforms/IRCE/multiple-access-no-preloop.ll +++ b/test/Transforms/IRCE/multiple-access-no-preloop.ll @@ -4,8 +4,8 @@ define void @multiple_access_no_preloop( i32* %arr_a, i32* %a_len_ptr, i32* %arr_b, i32* %b_len_ptr, i32 %n) { entry: - %len.a = load i32* %a_len_ptr, !range !0 - %len.b = load i32* %b_len_ptr, !range !0 + %len.a = load i32, i32* %a_len_ptr, !range !0 + %len.b = load i32, i32* %b_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -16,13 +16,13 @@ define void @multiple_access_no_preloop( br i1 %abc.a, label %in.bounds.a, label %out.of.bounds, !prof !1 in.bounds.a: - %addr.a = getelementptr i32* %arr_a, i32 %idx + %addr.a = getelementptr i32, i32* %arr_a, i32 %idx store i32 0, i32* %addr.a %abc.b = icmp slt i32 %idx, %len.b br i1 %abc.b, label %in.bounds.b, label %out.of.bounds, !prof !1 in.bounds.b: - %addr.b = getelementptr i32* %arr_b, i32 %idx + %addr.b = getelementptr i32, i32* %arr_b, i32 %idx store i32 -1, i32* %addr.b %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit diff --git a/test/Transforms/IRCE/not-likely-taken.ll b/test/Transforms/IRCE/not-likely-taken.ll index c044530..50a64a2 100644 --- a/test/Transforms/IRCE/not-likely-taken.ll +++ b/test/Transforms/IRCE/not-likely-taken.ll @@ -6,8 +6,8 @@ define void @multiple_access_no_preloop( i32* %arr_a, i32* %a_len_ptr, i32* %arr_b, i32* %b_len_ptr, i32 %n) { entry: - %len.a = load i32* %a_len_ptr, !range !0 - %len.b = load i32* %b_len_ptr, !range !0 + %len.a = load i32, i32* %a_len_ptr, !range !0 + %len.b = load i32, i32* %b_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -18,13 +18,13 @@ define void @multiple_access_no_preloop( br i1 %abc.a, label %in.bounds.a, label %out.of.bounds, !prof !1 in.bounds.a: - %addr.a = getelementptr i32* %arr_a, i32 %idx + %addr.a = getelementptr i32, i32* %arr_a, i32 %idx store i32 0, i32* %addr.a %abc.b = icmp slt i32 %idx, %len.b br i1 %abc.b, label %in.bounds.b, label %out.of.bounds, !prof !1 in.bounds.b: - %addr.b = getelementptr i32* %arr_b, i32 %idx + %addr.b = getelementptr i32, i32* %arr_b, i32 %idx store i32 -1, i32* %addr.b %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit diff --git a/test/Transforms/IRCE/only-lower-check.ll b/test/Transforms/IRCE/only-lower-check.ll new file mode 100644 index 0000000..69abc89 --- /dev/null +++ b/test/Transforms/IRCE/only-lower-check.ll @@ -0,0 +1,37 @@ +; RUN: opt -irce-print-range-checks -irce-print-changed-loops -irce < %s 2>&1 | FileCheck %s + +; CHECK: irce: loop has 1 inductive range checks: +; CHECK-NEXT: InductiveRangeCheck: +; CHECK-NEXT: Kind: RANGE_CHECK_LOWER +; CHECK-NEXT: Offset: (-1 + %n) Scale: -1 Length: (null) +; CHECK-NEXT: Branch: br i1 %abc, label %in.bounds, label %out.of.bounds +; CHECK-NEXT: irce: in function only_lower_check: constrained Loop at depth 1 containing: %loop<header><exiting>,%in.bounds<latch><exiting> + +define void @only_lower_check(i32 *%arr, i32 *%a_len_ptr, i32 %n) { + entry: + %len = load i32, i32* %a_len_ptr, !range !0 + %first.itr.check = icmp sgt i32 %n, 0 + %start = sub i32 %n, 1 + br i1 %first.itr.check, label %loop, label %exit + + loop: + %idx = phi i32 [ %start, %entry ] , [ %idx.dec, %in.bounds ] + %idx.dec = sub i32 %idx, 1 + %abc = icmp sge i32 %idx, 0 + br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 + + in.bounds: + %addr = getelementptr i32, i32* %arr, i32 %idx + store i32 0, i32* %addr + %next = icmp sgt i32 %idx.dec, -1 + br i1 %next, label %loop, label %exit + + out.of.bounds: + ret void + + exit: + ret void +} + +!0 = !{i32 0, i32 2147483647} +!1 = !{!"branch_weights", i32 64, i32 4} diff --git a/test/Transforms/IRCE/only-upper-check.ll b/test/Transforms/IRCE/only-upper-check.ll new file mode 100644 index 0000000..dda3f3f --- /dev/null +++ b/test/Transforms/IRCE/only-upper-check.ll @@ -0,0 +1,37 @@ +; RUN: opt -irce -irce-print-range-checks -irce-print-changed-loops %s -S 2>&1 | FileCheck %s + +; CHECK: irce: loop has 1 inductive range checks: +; CHECK-NEXT:InductiveRangeCheck: +; CHECK-NEXT: Kind: RANGE_CHECK_UPPER +; CHECK-NEXT: Offset: %offset Scale: 1 Length: %len = load i32, i32* %a_len_ptr, !range !0 +; CHECK-NEXT: Branch: br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 +; CHECK-NEXT: irce: in function incrementing: constrained Loop at depth 1 containing: %loop<header><exiting>,%in.bounds<latch><exiting> + +define void @incrementing(i32 *%arr, i32 *%a_len_ptr, i32 %n, i32 %offset) { + entry: + %len = load i32, i32* %a_len_ptr, !range !0 + %first.itr.check = icmp sgt i32 %n, 0 + br i1 %first.itr.check, label %loop, label %exit + + loop: + %idx = phi i32 [ 0, %entry ] , [ %idx.next, %in.bounds ] + %idx.next = add i32 %idx, 1 + %array.idx = add i32 %idx, %offset + %abc = icmp slt i32 %array.idx, %len + br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 + + in.bounds: + %addr = getelementptr i32, i32* %arr, i32 %array.idx + store i32 0, i32* %addr + %next = icmp slt i32 %idx.next, %n + br i1 %next, label %loop, label %exit + + out.of.bounds: + ret void + + exit: + ret void +} + +!0 = !{i32 0, i32 2147483647} +!1 = !{!"branch_weights", i32 64, i32 4} diff --git a/test/Transforms/IRCE/single-access-no-preloop.ll b/test/Transforms/IRCE/single-access-no-preloop.ll index 4d47ba8..4824d95 100644 --- a/test/Transforms/IRCE/single-access-no-preloop.ll +++ b/test/Transforms/IRCE/single-access-no-preloop.ll @@ -2,7 +2,7 @@ define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 %n) { entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -13,7 +13,7 @@ define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 in.bounds: - %addr = getelementptr i32* %arr, i32 %idx + %addr = getelementptr i32, i32* %arr, i32 %idx store i32 0, i32* %addr %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit @@ -49,7 +49,7 @@ define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 ; CHECK-NEXT: br i1 %abc.postloop, label %in.bounds.postloop, label %out.of.bounds ; CHECK-LABEL: in.bounds.postloop: -; CHECK-NEXT: %addr.postloop = getelementptr i32* %arr, i32 %idx.postloop +; CHECK-NEXT: %addr.postloop = getelementptr i32, i32* %arr, i32 %idx.postloop ; CHECK-NEXT: store i32 0, i32* %addr.postloop ; CHECK-NEXT: %next.postloop = icmp slt i32 %idx.next.postloop, %n ; CHECK-NEXT: br i1 %next.postloop, label %loop.postloop, label %exit.loopexit @@ -57,7 +57,7 @@ define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 define void @single_access_no_preloop_with_offset(i32 *%arr, i32 *%a_len_ptr, i32 %n) { entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -69,7 +69,7 @@ define void @single_access_no_preloop_with_offset(i32 *%arr, i32 *%a_len_ptr, i3 br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 in.bounds: - %addr = getelementptr i32* %arr, i32 %idx.for.abc + %addr = getelementptr i32, i32* %arr, i32 %idx.for.abc store i32 0, i32* %addr %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit diff --git a/test/Transforms/IRCE/single-access-with-preloop.ll b/test/Transforms/IRCE/single-access-with-preloop.ll index 16426b8..e581014 100644 --- a/test/Transforms/IRCE/single-access-with-preloop.ll +++ b/test/Transforms/IRCE/single-access-with-preloop.ll @@ -2,7 +2,7 @@ define void @single_access_with_preloop(i32 *%arr, i32 *%a_len_ptr, i32 %n, i32 %offset) { entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -16,7 +16,7 @@ define void @single_access_with_preloop(i32 *%arr, i32 *%a_len_ptr, i32 %n, i32 br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 in.bounds: - %addr = getelementptr i32* %arr, i32 %array.idx + %addr = getelementptr i32, i32* %arr, i32 %array.idx store i32 0, i32* %addr %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit diff --git a/test/Transforms/IRCE/unhandled.ll b/test/Transforms/IRCE/unhandled.ll index 3531c48..0d5ff95 100644 --- a/test/Transforms/IRCE/unhandled.ll +++ b/test/Transforms/IRCE/unhandled.ll @@ -7,7 +7,7 @@ define void @general_affine_expressions(i32 *%arr, i32 *%a_len_ptr, i32 %n, i32 %scale, i32 %offset) { ; CHECK-NOT: constrained Loop at depth entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -22,7 +22,7 @@ define void @general_affine_expressions(i32 *%arr, i32 *%a_len_ptr, i32 %n, br i1 %abc, label %in.bounds, label %out.of.bounds in.bounds: - %addr = getelementptr i32* %arr, i32 %array.idx + %addr = getelementptr i32, i32* %arr, i32 %array.idx store i32 0, i32* %addr %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit diff --git a/test/Transforms/IRCE/with-parent-loops.ll b/test/Transforms/IRCE/with-parent-loops.ll index f8d6c83..00af20b 100644 --- a/test/Transforms/IRCE/with-parent-loops.ll +++ b/test/Transforms/IRCE/with-parent-loops.ll @@ -8,7 +8,7 @@ define void @inner_loop(i32* %arr, i32* %a_len_ptr, i32 %n) #0 { ; CHECK: irce: in function inner_loop: constrained Loop at depth 1 containing: %loop<header><exiting>,%in.bounds<latch><exiting> entry: - %len = load i32* %a_len_ptr, !range !0 + %len = load i32, i32* %a_len_ptr, !range !0 %first.itr.check = icmp sgt i32 %n, 0 br i1 %first.itr.check, label %loop, label %exit @@ -19,7 +19,7 @@ loop: ; preds = %in.bounds, %entry br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 in.bounds: ; preds = %loop - %addr = getelementptr i32* %arr, i32 %idx + %addr = getelementptr i32, i32* %arr, i32 %idx store i32 0, i32* %addr %next = icmp slt i32 %idx.next, %n br i1 %next, label %loop, label %exit @@ -42,7 +42,7 @@ loop: ; preds = %inner_loop.exit, %e %idx = phi i32 [ 0, %entry ], [ %idx.next, %inner_loop.exit ] %idx.next = add i32 %idx, 1 %next = icmp ult i32 %idx.next, %parent.count - %len.i = load i32* %a_len_ptr, !range !0 + %len.i = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i = icmp sgt i32 %n, 0 br i1 %first.itr.check.i, label %loop.i, label %exit.i @@ -53,7 +53,7 @@ loop.i: ; preds = %in.bounds.i, %loop br i1 %abc.i, label %in.bounds.i, label %out.of.bounds.i, !prof !1 in.bounds.i: ; preds = %loop.i - %addr.i = getelementptr i32* %arr, i32 %idx.i + %addr.i = getelementptr i32, i32* %arr, i32 %idx.i store i32 0, i32* %addr.i %next.i = icmp slt i32 %idx.next.i, %n br i1 %next.i, label %loop.i, label %exit.i @@ -88,7 +88,7 @@ loop.i: ; preds = %inner_loop.exit.i, %idx.i = phi i32 [ 0, %loop ], [ %idx.next.i, %inner_loop.exit.i ] %idx.next.i = add i32 %idx.i, 1 %next.i = icmp ult i32 %idx.next.i, %parent.count - %len.i.i = load i32* %a_len_ptr, !range !0 + %len.i.i = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i.i = icmp sgt i32 %n, 0 br i1 %first.itr.check.i.i, label %loop.i.i, label %exit.i.i @@ -99,7 +99,7 @@ loop.i.i: ; preds = %in.bounds.i.i, %loo br i1 %abc.i.i, label %in.bounds.i.i, label %out.of.bounds.i.i, !prof !1 in.bounds.i.i: ; preds = %loop.i.i - %addr.i.i = getelementptr i32* %arr, i32 %idx.i.i + %addr.i.i = getelementptr i32, i32* %arr, i32 %idx.i.i store i32 0, i32* %addr.i.i %next.i.i = icmp slt i32 %idx.next.i.i, %n br i1 %next.i.i, label %loop.i.i, label %exit.i.i @@ -132,7 +132,7 @@ loop: ; preds = %inner_loop.exit12, %idx = phi i32 [ 0, %entry ], [ %idx.next, %inner_loop.exit12 ] %idx.next = add i32 %idx, 1 %next = icmp ult i32 %idx.next, %parent.count - %len.i = load i32* %a_len_ptr, !range !0 + %len.i = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i = icmp sgt i32 %n, 0 br i1 %first.itr.check.i, label %loop.i, label %exit.i @@ -143,7 +143,7 @@ loop.i: ; preds = %in.bounds.i, %loop br i1 %abc.i, label %in.bounds.i, label %out.of.bounds.i, !prof !1 in.bounds.i: ; preds = %loop.i - %addr.i = getelementptr i32* %arr, i32 %idx.i + %addr.i = getelementptr i32, i32* %arr, i32 %idx.i store i32 0, i32* %addr.i %next.i = icmp slt i32 %idx.next.i, %n br i1 %next.i, label %loop.i, label %exit.i @@ -155,7 +155,7 @@ exit.i: ; preds = %in.bounds.i, %loop br label %inner_loop.exit inner_loop.exit: ; preds = %exit.i, %out.of.bounds.i - %len.i1 = load i32* %a_len_ptr, !range !0 + %len.i1 = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i2 = icmp sgt i32 %n, 0 br i1 %first.itr.check.i2, label %loop.i6, label %exit.i11 @@ -166,7 +166,7 @@ loop.i6: ; preds = %in.bounds.i9, %inne br i1 %abc.i5, label %in.bounds.i9, label %out.of.bounds.i10, !prof !1 in.bounds.i9: ; preds = %loop.i6 - %addr.i7 = getelementptr i32* %arr, i32 %idx.i3 + %addr.i7 = getelementptr i32, i32* %arr, i32 %idx.i3 store i32 0, i32* %addr.i7 %next.i8 = icmp slt i32 %idx.next.i4, %n br i1 %next.i8, label %loop.i6, label %exit.i11 @@ -202,7 +202,7 @@ loop.i: ; preds = %inner_loop.exit.i, %idx.i = phi i32 [ 0, %loop ], [ %idx.next.i, %inner_loop.exit.i ] %idx.next.i = add i32 %idx.i, 1 %next.i = icmp ult i32 %idx.next.i, %parent.count - %len.i.i = load i32* %a_len_ptr, !range !0 + %len.i.i = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i.i = icmp sgt i32 %n, 0 br i1 %first.itr.check.i.i, label %loop.i.i, label %exit.i.i @@ -213,7 +213,7 @@ loop.i.i: ; preds = %in.bounds.i.i, %loo br i1 %abc.i.i, label %in.bounds.i.i, label %out.of.bounds.i.i, !prof !1 in.bounds.i.i: ; preds = %loop.i.i - %addr.i.i = getelementptr i32* %arr, i32 %idx.i.i + %addr.i.i = getelementptr i32, i32* %arr, i32 %idx.i.i store i32 0, i32* %addr.i.i %next.i.i = icmp slt i32 %idx.next.i.i, %n br i1 %next.i.i, label %loop.i.i, label %exit.i.i @@ -234,7 +234,7 @@ loop.i6: ; preds = %inner_loop.exit.i16 %idx.i1 = phi i32 [ 0, %with_parent.exit ], [ %idx.next.i2, %inner_loop.exit.i16 ] %idx.next.i2 = add i32 %idx.i1, 1 %next.i3 = icmp ult i32 %idx.next.i2, %parent.count - %len.i.i4 = load i32* %a_len_ptr, !range !0 + %len.i.i4 = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i.i5 = icmp sgt i32 %n, 0 br i1 %first.itr.check.i.i5, label %loop.i.i10, label %exit.i.i15 @@ -245,7 +245,7 @@ loop.i.i10: ; preds = %in.bounds.i.i13, %l br i1 %abc.i.i9, label %in.bounds.i.i13, label %out.of.bounds.i.i14, !prof !1 in.bounds.i.i13: ; preds = %loop.i.i10 - %addr.i.i11 = getelementptr i32* %arr, i32 %idx.i.i7 + %addr.i.i11 = getelementptr i32, i32* %arr, i32 %idx.i.i7 store i32 0, i32* %addr.i.i11 %next.i.i12 = icmp slt i32 %idx.next.i.i8, %n br i1 %next.i.i12, label %loop.i.i10, label %exit.i.i15 @@ -278,7 +278,7 @@ loop: ; preds = %with_parent.exit, % %idx = phi i32 [ 0, %entry ], [ %idx.next, %with_parent.exit ] %idx.next = add i32 %idx, 1 %next = icmp ult i32 %idx.next, %grandparent.count - %len.i = load i32* %a_len_ptr, !range !0 + %len.i = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i = icmp sgt i32 %n, 0 br i1 %first.itr.check.i, label %loop.i, label %exit.i @@ -289,7 +289,7 @@ loop.i: ; preds = %in.bounds.i, %loop br i1 %abc.i, label %in.bounds.i, label %out.of.bounds.i, !prof !1 in.bounds.i: ; preds = %loop.i - %addr.i = getelementptr i32* %arr, i32 %idx.i + %addr.i = getelementptr i32, i32* %arr, i32 %idx.i store i32 0, i32* %addr.i %next.i = icmp slt i32 %idx.next.i, %n br i1 %next.i, label %loop.i, label %exit.i @@ -307,7 +307,7 @@ loop.i4: ; preds = %inner_loop.exit.i, %idx.i1 = phi i32 [ 0, %inner_loop.exit ], [ %idx.next.i2, %inner_loop.exit.i ] %idx.next.i2 = add i32 %idx.i1, 1 %next.i3 = icmp ult i32 %idx.next.i2, %parent.count - %len.i.i = load i32* %a_len_ptr, !range !0 + %len.i.i = load i32, i32* %a_len_ptr, !range !0 %first.itr.check.i.i = icmp sgt i32 %n, 0 br i1 %first.itr.check.i.i, label %loop.i.i, label %exit.i.i @@ -318,7 +318,7 @@ loop.i.i: ; preds = %in.bounds.i.i, %loo br i1 %abc.i.i, label %in.bounds.i.i, label %out.of.bounds.i.i, !prof !1 in.bounds.i.i: ; preds = %loop.i.i - %addr.i.i = getelementptr i32* %arr, i32 %idx.i.i + %addr.i.i = getelementptr i32, i32* %arr, i32 %idx.i.i store i32 0, i32* %addr.i.i %next.i.i = icmp slt i32 %idx.next.i.i, %n br i1 %next.i.i, label %loop.i.i, label %exit.i.i |