[llvm] fe9e442 - [BasicAA] Add test for phi that contains itself (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 07:14:47 PST 2022
Author: Nikita Popov
Date: 2022-12-09T16:14:37+01:00
New Revision: fe9e442c57f3b50ec7ad5f01e191745aa3156b4e
URL: https://github.com/llvm/llvm-project/commit/fe9e442c57f3b50ec7ad5f01e191745aa3156b4e
DIFF: https://github.com/llvm/llvm-project/commit/fe9e442c57f3b50ec7ad5f01e191745aa3156b4e.diff
LOG: [BasicAA] Add test for phi that contains itself (NFC)
This currently produces a better result with PhiValues.
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 94d0ce087756..4d2fa3997539 100644
--- a/llvm/test/Analysis/BasicAA/recphi.ll
+++ b/llvm/test/Analysis/BasicAA/recphi.ll
@@ -413,4 +413,18 @@ exit:
ret void
}
+; NO-PHI-VALUES: MayAlias: i8* %a, i8* %phi
+; PHI-VALUES: MustAlias: i8* %a, i8* %phi
+define void @phi_contains_self() {
+entry:
+ %a = alloca i32
+ load i8, ptr %a
+ br label %loop
+
+loop:
+ %phi = phi ptr [ %phi, %loop ], [ %a, %entry ]
+ load i8, ptr %phi
+ br label %loop
+}
+
declare i16 @call(i32)
More information about the llvm-commits
mailing list