[llvm-commits] CVS: llvm/test/Regression/Transforms/BasicAA/2004-01-29-InvariantMemory.llx
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 30 16:19:02 PST 2004
Changes in directory llvm/test/Regression/Transforms/BasicAA:
2004-01-29-InvariantMemory.llx added (r1.1)
---
Log message:
New testcase for better mod/ref information that basicaa can provide
---
Diffs of the changes: (+12 -0)
Index: llvm/test/Regression/Transforms/BasicAA/2004-01-29-InvariantMemory.llx
diff -c /dev/null llvm/test/Regression/Transforms/BasicAA/2004-01-29-InvariantMemory.llx:1.1
*** /dev/null Fri Jan 30 16:18:57 2004
--- llvm/test/Regression/Transforms/BasicAA/2004-01-29-InvariantMemory.llx Fri Jan 30 16:18:47 2004
***************
*** 0 ****
--- 1,12 ----
+ ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep load
+
+ %X = constant [2 x int] [int 4, int 5]
+
+ int %test(int* %Y, long %idx) {
+ %P = getelementptr [2 x int]* %X, long 0, long %idx
+ %A = load int* %P ; Load from invariant memory
+ store int 4, int* %Y ; Store could not be to %X
+ %B = load int* %P
+ %C = sub int %A, %B
+ ret int %C
+ }
More information about the llvm-commits
mailing list