[llvm] 258e551 - [BasicAA] Convert test to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 07:05:54 PST 2022
Author: Nikita Popov
Date: 2022-12-09T16:05:46+01:00
New Revision: 258e551615dc8a93253874d6642481c82ec72f95
URL: https://github.com/llvm/llvm-project/commit/258e551615dc8a93253874d6642481c82ec72f95
DIFF: https://github.com/llvm/llvm-project/commit/258e551615dc8a93253874d6642481c82ec72f95.diff
LOG: [BasicAA] Convert test to opaque pointers (NFC)
Added:
Modified:
llvm/test/Analysis/BasicAA/recphi.ll
Removed:
################################################################################
diff --git a/llvm/test/Analysis/BasicAA/recphi.ll b/llvm/test/Analysis/BasicAA/recphi.ll
index cc9b573dc8f4..94d0ce087756 100644
--- a/llvm/test/Analysis/BasicAA/recphi.ll
+++ b/llvm/test/Analysis/BasicAA/recphi.ll
@@ -12,21 +12,21 @@
; CHECK: NoAlias: float* %g, float* %src2
; CHECK: NoAlias: float* %g, float* %phi
; CHECK: NoAlias: float* %g, float* %next
-define void @simple(float *%src1, float * noalias %src2, i32 %n) nounwind {
+define void @simple(ptr %src1, ptr noalias %src2, i32 %n) nounwind {
entry:
- load float, float* %src1
- load float, float* %src2
+ load float, ptr %src1
+ load float, ptr %src2
br label %loop
loop:
- %phi = phi float* [ %src2, %entry ], [ %next, %loop ]
+ %phi = phi ptr [ %src2, %entry ], [ %next, %loop ]
%idx = phi i32 [ 0, %entry ], [ %idxn, %loop ]
- %next = getelementptr inbounds float, float* %phi, i32 1
- %g = getelementptr inbounds float, float* %src1, i32 3
- %l = load float, float* %phi
- load float, float* %next
+ %next = getelementptr inbounds float, ptr %phi, i32 1
+ %g = getelementptr inbounds float, ptr %src1, i32 3
+ %l = load float, ptr %phi
+ load float, ptr %next
%a = fadd float %l, 1.0
- store float %a, float* %g
+ store float %a, ptr %g
%idxn = add nsw nuw i32 %idx, 1
%cmp5 = icmp eq i32 %idxn, %n
br i1 %cmp5, label %end, label %loop
@@ -36,51 +36,49 @@ end:
}
; CHECK-LABEL: Function: notmust: 6 pointers, 0 call sites
-; CHECK: MustAlias: i8* %0, [2 x i32]* %tab
+; CHECK: MustAlias: i8* %tab, [2 x i32]* %tab
; CHECK: PartialAlias (off -4): i32* %arrayidx, [2 x i32]* %tab
-; CHECK: NoAlias: i8* %0, i32* %arrayidx
-; CHECK: MustAlias: i32* %arrayidx1, [2 x i32]* %tab
-; CHECK: MustAlias: i8* %0, i32* %arrayidx1
-; CHECK: NoAlias: i32* %arrayidx, i32* %arrayidx1
+; CHECK: NoAlias: i32* %arrayidx, i8* %tab
+; CHECK: MustAlias: i32* %tab, [2 x i32]* %tab
+; CHECK: MustAlias: i32* %tab, i8* %tab
+; CHECK: NoAlias: i32* %arrayidx, i32* %tab
; CHECK: MayAlias: i32* %incdec.ptr.i, [2 x i32]* %tab
-; CHECK: NoAlias: i8* %0, i32* %incdec.ptr.i
+; CHECK: NoAlias: i32* %incdec.ptr.i, i8* %tab
; CHECK: MayAlias: i32* %arrayidx, i32* %incdec.ptr.i
-; CHECK: NoAlias: i32* %arrayidx1, i32* %incdec.ptr.i
+; CHECK: NoAlias: i32* %incdec.ptr.i, i32* %tab
; CHECK: MayAlias: i32* %p.addr.05.i, [2 x i32]* %tab
-; CHECK: MayAlias: i8* %0, i32* %p.addr.05.i
+; CHECK: MayAlias: i32* %p.addr.05.i, i8* %tab
; CHECK: MayAlias: i32* %arrayidx, i32* %p.addr.05.i
-; CHECK: MayAlias: i32* %arrayidx1, i32* %p.addr.05.i
+; CHECK: MayAlias: i32* %p.addr.05.i, i32* %tab
; CHECK: NoAlias: i32* %incdec.ptr.i, i32* %p.addr.05.i
define i32 @notmust() nounwind {
entry:
%tab = alloca [2 x i32], align 4
- %ignore1 = load [2 x i32], [2 x i32]* %tab
- %0 = bitcast [2 x i32]* %tab to i8*
- %ignore2 = load i8, i8* %0
- %arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tab, i32 0, i32 1
- store i32 0, i32* %arrayidx, align 4
- %arrayidx1 = getelementptr inbounds [2 x i32], [2 x i32]* %tab, i32 0, i32 0
- store i32 0, i32* %arrayidx1, align 4
- %1 = add i32 1, 1
- %cmp4.i = icmp slt i32 %1, 2
+ %ignore1 = load [2 x i32], ptr %tab
+ %ignore2 = load i8, ptr %tab
+ %arrayidx = getelementptr inbounds [2 x i32], ptr %tab, i32 0, i32 1
+ store i32 0, ptr %arrayidx, align 4
+ store i32 0, ptr %tab, align 4
+ %0 = add i32 1, 1
+ %cmp4.i = icmp slt i32 %0, 2
br i1 %cmp4.i, label %while.body.i, label %f.exit
while.body.i: ; preds = %while.body.i, %entry
- %2 = phi i32 [ 1, %while.body.i ], [ %1, %entry ]
+ %1 = phi i32 [ 1, %while.body.i ], [ %0, %entry ]
%foo.06.i = phi i32 [ %sub.i, %while.body.i ], [ 2, %entry ]
- %p.addr.05.i = phi i32* [ %incdec.ptr.i, %while.body.i ], [ %arrayidx1, %entry ]
- %sub.i = sub nsw i32 %foo.06.i, %2
- %incdec.ptr.i = getelementptr inbounds i32, i32* %p.addr.05.i, i32 1
- %ignore3 = load i32, i32* %incdec.ptr.i
- store i32 %sub.i, i32* %p.addr.05.i, align 4
+ %p.addr.05.i = phi ptr [ %incdec.ptr.i, %while.body.i ], [ %tab, %entry ]
+ %sub.i = sub nsw i32 %foo.06.i, %1
+ %incdec.ptr.i = getelementptr inbounds i32, ptr %p.addr.05.i, i32 1
+ %ignore3 = load i32, ptr %incdec.ptr.i
+ store i32 %sub.i, ptr %p.addr.05.i, align 4
%cmp.i = icmp sgt i32 %sub.i, 1
br i1 %cmp.i, label %while.body.i, label %f.exit
f.exit: ; preds = %entry, %while.body.i
- %3 = load i32, i32* %arrayidx1, align 4
- %cmp = icmp eq i32 %3, 2
- %4 = load i32, i32* %arrayidx, align 4
- %cmp4 = icmp eq i32 %4, 1
+ %2 = load i32, ptr %tab, align 4
+ %cmp = icmp eq i32 %2, 2
+ %3 = load i32, ptr %arrayidx, align 4
+ %cmp4 = icmp eq i32 %3, 1
%or.cond = and i1 %cmp, %cmp4
br i1 %or.cond, label %if.end, label %if.then
@@ -92,51 +90,49 @@ if.end: ; preds = %f.exit
}
; CHECK-LABEL: Function: reverse: 6 pointers, 0 call sites
-; CHECK: MustAlias: i8* %0, [10 x i32]* %tab
-; CHECK: MustAlias: i32* %arrayidx, [10 x i32]* %tab
-; CHECK: MustAlias: i8* %0, i32* %arrayidx
+; CHECK: MustAlias: i8* %tab, [10 x i32]* %tab
+; CHECK: MustAlias: i32* %tab, [10 x i32]* %tab
+; CHECK: MustAlias: i32* %tab, i8* %tab
; CHECK: PartialAlias (off -36): i32* %arrayidx1, [10 x i32]* %tab
-; CHECK: NoAlias: i8* %0, i32* %arrayidx1
-; CHECK: NoAlias: i32* %arrayidx, i32* %arrayidx1
+; CHECK: NoAlias: i32* %arrayidx1, i8* %tab
+; CHECK: NoAlias: i32* %arrayidx1, i32* %tab
; CHECK: MayAlias: i32* %incdec.ptr.i, [10 x i32]* %tab
-; CHECK: MayAlias: i8* %0, i32* %incdec.ptr.i
-; CHECK: MayAlias: i32* %arrayidx, i32* %incdec.ptr.i
+; CHECK: MayAlias: i32* %incdec.ptr.i, i8* %tab
+; CHECK: MayAlias: i32* %incdec.ptr.i, i32* %tab
; CHECK: MayAlias: i32* %arrayidx1, i32* %incdec.ptr.i
; CHECK: MayAlias: i32* %p.addr.05.i, [10 x i32]* %tab
-; CHECK: MayAlias: i8* %0, i32* %p.addr.05.i
-; CHECK: MayAlias: i32* %arrayidx, i32* %p.addr.05.i
+; CHECK: MayAlias: i32* %p.addr.05.i, i8* %tab
+; CHECK: MayAlias: i32* %p.addr.05.i, i32* %tab
; CHECK: MayAlias: i32* %arrayidx1, i32* %p.addr.05.i
; CHECK: NoAlias: i32* %incdec.ptr.i, i32* %p.addr.05.i
define i32 @reverse() nounwind {
entry:
%tab = alloca [10 x i32], align 4
- %ignore1 = load [10 x i32], [10 x i32]* %tab
- %0 = bitcast [10 x i32]* %tab to i8*
- %ignore2 = load i8, i8* %0
- %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %tab, i32 0, i32 0
- store i32 0, i32* %arrayidx, align 4
- %arrayidx1 = getelementptr inbounds [10 x i32], [10 x i32]* %tab, i32 0, i32 9
- store i32 0, i32* %arrayidx1, align 4
- %1 = add i32 1, 1
- %cmp4.i = icmp slt i32 %1, 2
+ %ignore1 = load [10 x i32], ptr %tab
+ %ignore2 = load i8, ptr %tab
+ store i32 0, ptr %tab, align 4
+ %arrayidx1 = getelementptr inbounds [10 x i32], ptr %tab, i32 0, i32 9
+ store i32 0, ptr %arrayidx1, align 4
+ %0 = add i32 1, 1
+ %cmp4.i = icmp slt i32 %0, 2
br i1 %cmp4.i, label %while.body.i, label %f.exit
while.body.i: ; preds = %while.body.i, %entry
- %2 = phi i32 [ 1, %while.body.i ], [ %1, %entry ]
+ %1 = phi i32 [ 1, %while.body.i ], [ %0, %entry ]
%foo.06.i = phi i32 [ %sub.i, %while.body.i ], [ 2, %entry ]
- %p.addr.05.i = phi i32* [ %incdec.ptr.i, %while.body.i ], [ %arrayidx1, %entry ]
- %sub.i = sub nsw i32 %foo.06.i, %2
- %incdec.ptr.i = getelementptr inbounds i32, i32* %p.addr.05.i, i32 -1
- %ignore3 = load i32, i32* %incdec.ptr.i
- store i32 %sub.i, i32* %p.addr.05.i, align 4
+ %p.addr.05.i = phi ptr [ %incdec.ptr.i, %while.body.i ], [ %arrayidx1, %entry ]
+ %sub.i = sub nsw i32 %foo.06.i, %1
+ %incdec.ptr.i = getelementptr inbounds i32, ptr %p.addr.05.i, i32 -1
+ %ignore3 = load i32, ptr %incdec.ptr.i
+ store i32 %sub.i, ptr %p.addr.05.i, align 4
%cmp.i = icmp sgt i32 %sub.i, 1
br i1 %cmp.i, label %while.body.i, label %f.exit
f.exit: ; preds = %entry, %while.body.i
- %3 = load i32, i32* %arrayidx1, align 4
- %cmp = icmp eq i32 %3, 2
- %4 = load i32, i32* %arrayidx, align 4
- %cmp4 = icmp eq i32 %4, 1
+ %2 = load i32, ptr %arrayidx1, align 4
+ %cmp = icmp eq i32 %2, 2
+ %3 = load i32, ptr %tab, align 4
+ %cmp4 = icmp eq i32 %3, 1
%or.cond = and i1 %cmp, %cmp4
br i1 %or.cond, label %if.end, label %if.then
@@ -165,24 +161,24 @@ if.end: ; preds = %f.exit
; CHECK: NoModRef: Ptr: i16* %_tmp11 <-> %_tmp16 = call i16 @call(i32 %_tmp13)
define i16 @negative(i16 %argc.5.par) {
%int_arr.10 = alloca [3 x i16], align 1
- load [3 x i16], [3 x i16]* %int_arr.10
- %_tmp1 = getelementptr inbounds [3 x i16], [3 x i16]* %int_arr.10, i16 0, i16 2
- load i16, i16* %_tmp1
+ load [3 x i16], ptr %int_arr.10
+ %_tmp1 = getelementptr inbounds [3 x i16], ptr %int_arr.10, i16 0, i16 2
+ load i16, ptr %_tmp1
br label %bb1
bb1: ; preds = %bb1, %0
%i.7.0 = phi i16 [ 2, %0 ], [ %_tmp5, %bb1 ]
- %ls1.9.0 = phi i16* [ %_tmp1, %0 ], [ %_tmp7, %bb1 ]
- store i16 %i.7.0, i16* %ls1.9.0, align 1
+ %ls1.9.0 = phi ptr [ %_tmp1, %0 ], [ %_tmp7, %bb1 ]
+ store i16 %i.7.0, ptr %ls1.9.0, align 1
%_tmp5 = add nsw i16 %i.7.0, -1
- %_tmp7 = getelementptr i16, i16* %ls1.9.0, i16 -1
- load i16, i16* %_tmp7
+ %_tmp7 = getelementptr i16, ptr %ls1.9.0, i16 -1
+ load i16, ptr %_tmp7
%_tmp9 = icmp sgt i16 %i.7.0, 0
br i1 %_tmp9, label %bb1, label %bb3
bb3: ; preds = %bb1
- %_tmp11 = getelementptr inbounds [3 x i16], [3 x i16]* %int_arr.10, i16 0, i16 1
- %_tmp12 = load i16, i16* %_tmp11, align 1
+ %_tmp11 = getelementptr inbounds [3 x i16], ptr %int_arr.10, i16 0, i16 1
+ %_tmp12 = load i16, ptr %_tmp11, align 1
%_tmp13 = sext i16 %_tmp12 to i32
%_tmp16 = call i16 @call(i32 %_tmp13)
%_tmp18.not = icmp eq i16 %_tmp12, 1
@@ -202,19 +198,19 @@ bb5: ; preds = %bb3, %bb4
; CHECK: MayAlias: i8* %p.base, i8* %p.next
; CHECK: NoAlias: i8* %a, i8* %p.next
; CHECK: MayAlias: i8* %p, i8* %p.next
-define void @dynamic_offset(i1 %c, i8* noalias %p.base) {
+define void @dynamic_offset(i1 %c, ptr noalias %p.base) {
entry:
%a = alloca i8
- load i8, i8* %p.base
- load i8, i8* %a
+ load i8, ptr %p.base
+ load i8, ptr %a
br label %loop
loop:
- %p = phi i8* [ %p.base, %entry ], [ %p.next, %loop ]
+ %p = phi ptr [ %p.base, %entry ], [ %p.next, %loop ]
%offset = call i16 @call(i32 0)
- %p.next = getelementptr inbounds i8, i8* %p, i16 %offset
- load i8, i8* %p
- load i8, i8* %p.next
+ %p.next = getelementptr inbounds i8, ptr %p, i16 %offset
+ load i8, ptr %p
+ load i8, ptr %p.next
br i1 %c, label %loop, label %exit
exit:
@@ -229,22 +225,22 @@ exit:
; CHECK: MayAlias: i32* %p.base, i32* %result
; CHECK: NoAlias: i32* %p, i32* %result
; CHECK: MustAlias: i32* %p.next, i32* %result
-define i32* @symmetry(i32* %p.base, i1 %c) {
+define ptr @symmetry(ptr %p.base, i1 %c) {
entry:
- load i32, i32* %p.base
+ load i32, ptr %p.base
br label %loop
loop:
- %p = phi i32* [ %p.base, %entry ], [ %p.next, %loop ]
- %p.next = getelementptr inbounds i32, i32* %p, i32 1
- load i32, i32* %p
- load i32, i32* %p.next
+ %p = phi ptr [ %p.base, %entry ], [ %p.next, %loop ]
+ %p.next = getelementptr inbounds i32, ptr %p, i32 1
+ load i32, ptr %p
+ load i32, ptr %p.next
br i1 %c, label %loop, label %exit
exit:
- %result = phi i32* [ %p.next, %loop ]
- load i32, i32* %result
- ret i32* %result
+ %result = phi ptr [ %p.next, %loop ]
+ load i32, ptr %result
+ ret ptr %result
}
; CHECK-LABEL: Function: nested_loop
@@ -254,28 +250,28 @@ exit:
; PHI-VALUES: NoAlias: i8* %a, i8* %p.inner
; CHECK: NoAlias: i8* %a, i8* %p.inner.next
; CHECK: NoAlias: i8* %a, i8* %p.outer.next
-define void @nested_loop(i1 %c, i1 %c2, i8* noalias %p.base) {
+define void @nested_loop(i1 %c, i1 %c2, ptr noalias %p.base) {
entry:
%a = alloca i8
- load i8, i8* %p.base
- load i8, i8* %a
+ load i8, ptr %p.base
+ load i8, ptr %a
br label %outer_loop
outer_loop:
- %p.outer = phi i8* [ %p.base, %entry ], [ %p.outer.next, %outer_loop_latch ]
- load i8, i8* %p.outer
+ %p.outer = phi ptr [ %p.base, %entry ], [ %p.outer.next, %outer_loop_latch ]
+ load i8, ptr %p.outer
br label %inner_loop
inner_loop:
- %p.inner = phi i8* [ %p.outer, %outer_loop ], [ %p.inner.next, %inner_loop ]
- %p.inner.next = getelementptr inbounds i8, i8* %p.inner, i64 1
- load i8, i8* %p.inner
- load i8, i8* %p.inner.next
+ %p.inner = phi ptr [ %p.outer, %outer_loop ], [ %p.inner.next, %inner_loop ]
+ %p.inner.next = getelementptr inbounds i8, ptr %p.inner, i64 1
+ load i8, ptr %p.inner
+ load i8, ptr %p.inner.next
br i1 %c, label %inner_loop, label %outer_loop_latch
outer_loop_latch:
- %p.outer.next = getelementptr inbounds i8, i8* %p.inner, i64 10
- load i8, i8* %p.outer.next
+ %p.outer.next = getelementptr inbounds i8, ptr %p.inner, i64 10
+ load i8, ptr %p.outer.next
br i1 %c2, label %outer_loop, label %exit
exit:
@@ -290,25 +286,25 @@ exit:
; CHECK: MayAlias: i8* %a, i8* %p.inner
; CHECK: NoAlias: i8* %a, i8* %p.inner.next
; TODO: (a, p.inner) could be NoAlias
-define void @nested_loop2(i1 %c, i1 %c2, i8* noalias %p.base) {
+define void @nested_loop2(i1 %c, i1 %c2, ptr noalias %p.base) {
entry:
%a = alloca i8
- load i8, i8* %p.base
- load i8, i8* %a
+ load i8, ptr %p.base
+ load i8, ptr %a
br label %outer_loop
outer_loop:
- %p.outer = phi i8* [ %p.base, %entry ], [ %p.outer.next, %outer_loop_latch ]
- %p.outer.next = getelementptr inbounds i8, i8* %p.outer, i64 10
- load i8, i8* %p.outer
- load i8, i8* %p.outer.next
+ %p.outer = phi ptr [ %p.base, %entry ], [ %p.outer.next, %outer_loop_latch ]
+ %p.outer.next = getelementptr inbounds i8, ptr %p.outer, i64 10
+ load i8, ptr %p.outer
+ load i8, ptr %p.outer.next
br label %inner_loop
inner_loop:
- %p.inner = phi i8* [ %p.outer.next, %outer_loop ], [ %p.inner.next, %inner_loop ]
- %p.inner.next = getelementptr inbounds i8, i8* %p.inner, i64 1
- load i8, i8* %p.inner
- load i8, i8* %p.inner.next
+ %p.inner = phi ptr [ %p.outer.next, %outer_loop ], [ %p.inner.next, %inner_loop ]
+ %p.inner.next = getelementptr inbounds i8, ptr %p.inner, i64 1
+ load i8, ptr %p.inner
+ load i8, ptr %p.inner.next
br i1 %c, label %inner_loop, label %outer_loop_latch
outer_loop_latch:
@@ -325,25 +321,25 @@ exit:
; NO-PHI-VALUES: NoAlias: i8* %a, i8* %p.inner
; PHI-VALUES: MayAlias: i8* %a, i8* %p.inner
; CHECK: NoAlias: i8* %a, i8* %p.inner.next
-define void @nested_loop3(i1 %c, i1 %c2, i8* noalias %p.base) {
+define void @nested_loop3(i1 %c, i1 %c2, ptr noalias %p.base) {
entry:
%a = alloca i8
- load i8, i8* %p.base
- load i8, i8* %a
+ load i8, ptr %p.base
+ load i8, ptr %a
br label %outer_loop
outer_loop:
- %p.outer = phi i8* [ %p.base, %entry ], [ %p.outer.next, %outer_loop_latch ]
- %p.outer.next = getelementptr inbounds i8, i8* %p.outer, i64 10
- load i8, i8* %p.outer
- load i8, i8* %p.outer.next
+ %p.outer = phi ptr [ %p.base, %entry ], [ %p.outer.next, %outer_loop_latch ]
+ %p.outer.next = getelementptr inbounds i8, ptr %p.outer, i64 10
+ load i8, ptr %p.outer
+ load i8, ptr %p.outer.next
br label %inner_loop
inner_loop:
- %p.inner = phi i8* [ %p.outer, %outer_loop ], [ %p.inner.next, %inner_loop ]
- %p.inner.next = getelementptr inbounds i8, i8* %p.inner, i64 1
- load i8, i8* %p.inner
- load i8, i8* %p.inner.next
+ %p.inner = phi ptr [ %p.outer, %outer_loop ], [ %p.inner.next, %inner_loop ]
+ %p.inner.next = getelementptr inbounds i8, ptr %p.inner, i64 1
+ load i8, ptr %p.inner
+ load i8, ptr %p.inner.next
br i1 %c, label %inner_loop, label %outer_loop_latch
outer_loop_latch:
@@ -360,25 +356,25 @@ exit:
; CHECK: MayAlias: i8* %a, i8* %p2
; CHECK: NoAlias: i8* %a, i8* %p2.next
; TODO: %p2 does not alias %a
-define void @sibling_loop(i1 %c, i1 %c2, i8* noalias %p.base) {
+define void @sibling_loop(i1 %c, i1 %c2, ptr noalias %p.base) {
entry:
%a = alloca i8
- load i8, i8* %p.base
- load i8, i8* %a
+ load i8, ptr %p.base
+ load i8, ptr %a
br label %loop1
loop1:
- %p1 = phi i8* [ %p.base, %entry ], [ %p1.next, %loop1 ]
- %p1.next = getelementptr inbounds i8, i8* %p1, i64 10
- load i8, i8* %p1
- load i8, i8* %p1.next
+ %p1 = phi ptr [ %p.base, %entry ], [ %p1.next, %loop1 ]
+ %p1.next = getelementptr inbounds i8, ptr %p1, i64 10
+ load i8, ptr %p1
+ load i8, ptr %p1.next
br i1 %c, label %loop1, label %loop2
loop2:
- %p2 = phi i8* [ %p1.next, %loop1 ], [ %p2.next, %loop2 ]
- %p2.next = getelementptr inbounds i8, i8* %p2, i64 1
- load i8, i8* %p2
- load i8, i8* %p2.next
+ %p2 = phi ptr [ %p1.next, %loop1 ], [ %p2.next, %loop2 ]
+ %p2.next = getelementptr inbounds i8, ptr %p2, i64 1
+ load i8, ptr %p2
+ load i8, ptr %p2.next
br i1 %c2, label %loop2, label %exit
exit:
@@ -392,25 +388,25 @@ exit:
; NO-PHI-VALUES: NoAlias: i8* %a, i8* %p2
; PHI-VALUES: MayAlias: i8* %a, i8* %p2
; CHECK: NoAlias: i8* %a, i8* %p2.next
-define void @sibling_loop2(i1 %c, i1 %c2, i8* noalias %p.base) {
+define void @sibling_loop2(i1 %c, i1 %c2, ptr noalias %p.base) {
entry:
%a = alloca i8
- load i8, i8* %p.base
- load i8, i8* %a
+ load i8, ptr %p.base
+ load i8, ptr %a
br label %loop1
loop1:
- %p1 = phi i8* [ %p.base, %entry ], [ %p1.next, %loop1 ]
- %p1.next = getelementptr inbounds i8, i8* %p1, i64 10
- load i8, i8* %p1
- load i8, i8* %p1.next
+ %p1 = phi ptr [ %p.base, %entry ], [ %p1.next, %loop1 ]
+ %p1.next = getelementptr inbounds i8, ptr %p1, i64 10
+ load i8, ptr %p1
+ load i8, ptr %p1.next
br i1 %c, label %loop1, label %loop2
loop2:
- %p2 = phi i8* [ %p1, %loop1 ], [ %p2.next, %loop2 ]
- %p2.next = getelementptr inbounds i8, i8* %p2, i64 1
- load i8, i8* %p2
- load i8, i8* %p2.next
+ %p2 = phi ptr [ %p1, %loop1 ], [ %p2.next, %loop2 ]
+ %p2.next = getelementptr inbounds i8, ptr %p2, i64 1
+ load i8, ptr %p2
+ load i8, ptr %p2.next
br i1 %c2, label %loop2, label %exit
exit:
More information about the llvm-commits
mailing list