summaryrefslogtreecommitdiff
path: root/test/Analysis/GlobalsModRef
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-17 17:14:00 +0000
committerChris Lattner <sabre@nondot.org>2004-12-17 17:14:00 +0000
commitfeeeb30c3274cc0920f0a2e26924ee8792a7be98 (patch)
tree10dab488fb69b09c7f096b3a666fecef6dcc851a /test/Analysis/GlobalsModRef
parent41925f87d3e7fc9eb2b583267b99012dcb2774a0 (diff)
downloadllvm-feeeb30c3274cc0920f0a2e26924ee8792a7be98.tar.gz
llvm-feeeb30c3274cc0920f0a2e26924ee8792a7be98.tar.bz2
llvm-feeeb30c3274cc0920f0a2e26924ee8792a7be98.tar.xz
Make this testcase a bit more challanging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/GlobalsModRef')
-rw-r--r--test/Analysis/GlobalsModRef/purecse.ll10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Analysis/GlobalsModRef/purecse.ll b/test/Analysis/GlobalsModRef/purecse.ll
index f812494f1a..bed282338d 100644
--- a/test/Analysis/GlobalsModRef/purecse.ll
+++ b/test/Analysis/GlobalsModRef/purecse.ll
@@ -7,9 +7,17 @@ int %pure(int %X) {
ret int %Y
}
-int %test(int %X) {
+int %test1(int %X) {
%A = call int %pure(int %X)
%B = call int %pure(int %X)
%C = sub int %A, %B
ret int %C
}
+
+int %test2(int %X, int* %P) {
+ %A = call int %pure(int %X)
+ store int %X, int* %P ;; Does not invalidate 'pure' call.
+ %B = call int %pure(int %X)
+ %C = sub int %A, %B
+ ret int %C
+}