aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-17 15:16:35 +0000
committerChris Lattner <sabre@nondot.org>2003-06-17 15:16:35 +0000
commit1ae9143050218d8b57d184196da5ec447a67f7db (patch)
tree943b9ce0685ab06e47c29f26d6480a73a2d04c2d /test/Analysis
parentefa095e41830bdbbc4eb0c4ff423fe483f2de0e2 (diff)
downloadexternal_llvm-1ae9143050218d8b57d184196da5ec447a67f7db.zip
external_llvm-1ae9143050218d8b57d184196da5ec447a67f7db.tar.gz
external_llvm-1ae9143050218d8b57d184196da5ec447a67f7db.tar.bz2
Add new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/BasicAA/featuretest.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/featuretest.ll b/test/Analysis/BasicAA/featuretest.ll
index 26516d5..803dafb 100644
--- a/test/Analysis/BasicAA/featuretest.ll
+++ b/test/Analysis/BasicAA/featuretest.ll
@@ -6,6 +6,10 @@
; RUN: else exit 0
; RUN: fi
+%Global = external global { int }
+
+implementation
+
; Array test: Test that operations on one local array do not invalidate
; operations on another array. Important for scientific codes.
@@ -72,3 +76,13 @@ int %gep_distance_test3(int * %A) {
%Y = load sbyte* %C
ret int 8
}
+
+; Test that we can disambiguate globals reached through constantexpr geps
+int %constexpr_test() {
+ %X = alloca int
+ %Y = load int* %X
+ store int 5, int* getelementptr ({ int }* %Global, long 0, ubyte 0)
+ %REMOVE = load int* %X
+ %retval = sub int %Y, %REMOVE
+ ret int %retval
+}