[llvm] bfa95b4 - [BasicAA] Add test for byval argument (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 20 12:58:42 PST 2020
Author: Nikita Popov
Date: 2020-12-20T21:58:22+01:00
New Revision: bfa95b4ac79d5b3b2bbd6707859f63a2ef8caea7
URL: https://github.com/llvm/llvm-project/commit/bfa95b4ac79d5b3b2bbd6707859f63a2ef8caea7
DIFF: https://github.com/llvm/llvm-project/commit/bfa95b4ac79d5b3b2bbd6707859f63a2ef8caea7.diff
LOG: [BasicAA] Add test for byval argument (NFC)
Added:
Modified:
llvm/test/Analysis/BasicAA/noalias-param.ll
Removed:
################################################################################
diff --git a/llvm/test/Analysis/BasicAA/noalias-param.ll b/llvm/test/Analysis/BasicAA/noalias-param.ll
index 81aca4a2bb97..aab55595da2a 100644
--- a/llvm/test/Analysis/BasicAA/noalias-param.ll
+++ b/llvm/test/Analysis/BasicAA/noalias-param.ll
@@ -2,16 +2,18 @@
declare i32* @captures(i32* %cap) nounwind readonly
+; CHECK-LABEL: no
+; CHECK: NoAlias: i32* %a, i32* %b
define void @no(i32* noalias %a, i32* %b) nounwind {
entry:
- store i32 1, i32* %a
+ store i32 1, i32* %a
%cap = call i32* @captures(i32* %a) nounwind readonly
%l = load i32, i32* %b
ret void
}
-; CHECK: NoAlias: i32* %a, i32* %b
-
+; CHECK-LABEL: yes
+; CHECK: MayAlias: i32* %c, i32* %d
define void @yes(i32* %c, i32* %d) nounwind {
entry:
store i32 1, i32* %c
@@ -20,4 +22,13 @@ entry:
ret void
}
-; CHECK: MayAlias: i32* %c, i32* %d
+; TODO: Result should be the same for byval instead of noalias.
+; CHECK-LABEL: byval
+; CHECK: MayAlias: i32* %a, i32* %b
+define void @byval(i32* byval(i32) %a, i32* %b) nounwind {
+entry:
+ store i32 1, i32* %a
+ %cap = call i32* @captures(i32* %a) nounwind readonly
+ %l = load i32, i32* %b
+ ret void
+}
More information about the llvm-commits
mailing list