aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-29 18:17:11 +0000
committerDan Gohman <gohman@apple.com>2010-06-29 18:17:11 +0000
commitaf0824701bf3d0ff1a914866c78c0d1b99d0aa23 (patch)
treea36647ba8ef21e70762bde864c0ccd4e072a6481 /test/Analysis
parent6f205cbceb487b327708faf7ad25007b754dcf36 (diff)
downloadexternal_llvm-af0824701bf3d0ff1a914866c78c0d1b99d0aa23.zip
external_llvm-af0824701bf3d0ff1a914866c78c0d1b99d0aa23.tar.gz
external_llvm-af0824701bf3d0ff1a914866c78c0d1b99d0aa23.tar.bz2
Add a few more interesting testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/BasicAA/interprocedural.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/interprocedural.ll b/test/Analysis/BasicAA/interprocedural.ll
index 2195716..8d34695 100644
--- a/test/Analysis/BasicAA/interprocedural.ll
+++ b/test/Analysis/BasicAA/interprocedural.ll
@@ -40,3 +40,24 @@ define i64* @r0(i64* %u) {
store i64 0, i64* %v
ret i64* %t
}
+
+; The noalias attribute is not necessarily safe in an interprocedural context even
+; in comparison to other noalias arguments in the same function.
+; CHECK: MayAlias: i8* %w, i8* %x
+
+define void @q0(i8* noalias %w, i8* noalias %x) {
+ store i8 0, i8* %w
+ store i8 0, i8* %x
+ call void @q0(i8* noalias %x, i8* noalias %w)
+ unreachable
+}
+
+; The noalias attribute is not necessarily safe in an interprocedural context.
+; CHECK: MayAlias: double* %y, double* @G
+
+@G = external global double
+define void @p0(double* noalias %y) {
+ store double 0.0, double* %y
+ store double 0.0, double* @G
+ unreachable
+}