[llvm] da46a2a - [BasicAA] Add test for single arg phi in loop (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 14 10:41:53 PST 2021
Author: Nikita Popov
Date: 2021-02-14T19:35:36+01:00
New Revision: da46a2a87bca044fe1577bb0ca674296848453b8
URL: https://github.com/llvm/llvm-project/commit/da46a2a87bca044fe1577bb0ca674296848453b8
DIFF: https://github.com/llvm/llvm-project/commit/da46a2a87bca044fe1577bb0ca674296848453b8.diff
LOG: [BasicAA] Add test for single arg phi in loop (NFC)
Added:
Modified:
llvm/test/Analysis/BasicAA/phi-aa.ll
Removed:
################################################################################
diff --git a/llvm/test/Analysis/BasicAA/phi-aa.ll b/llvm/test/Analysis/BasicAA/phi-aa.ll
index bf5915f1e0fe..5ec85039aaff 100644
--- a/llvm/test/Analysis/BasicAA/phi-aa.ll
+++ b/llvm/test/Analysis/BasicAA/phi-aa.ll
@@ -197,3 +197,22 @@ for.body: ; preds = %for.body, %entry
store i32 0, i32* %arrayidx13, align 4
br label %for.body
}
+
+; CHECK-LABEL: single_arg_phi
+; CHECK: MayAlias: i32* %ptr, i32* %ptr.next
+; CHECK: MayAlias: i32* %ptr.next, i32* %ptr.next.phi
+; TODO: Both of these could be MustAlias.
+define void @single_arg_phi(i32* %ptr.base) {
+entry:
+ br label %loop
+
+loop:
+ %ptr = phi i32* [ %ptr.base, %entry ], [ %ptr.next, %split ]
+ %ptr.next = getelementptr inbounds i32, i32* %ptr, i64 1
+ br label %split
+
+split:
+ %ptr.phi = phi i32* [ %ptr, %loop ]
+ %ptr.next.phi = phi i32* [ %ptr.next, %loop ]
+ br label %loop
+}
More information about the llvm-commits
mailing list