[llvm-commits] CVS: llvm/test/Regression/Analysis/GlobalsModRef/chaining-analysis.ll
Chris Lattner
lattner at cs.uiuc.edu
Wed Mar 23 15:49:12 PST 2005
Changes in directory llvm/test/Regression/Analysis/GlobalsModRef:
chaining-analysis.ll added (r1.1)
---
Log message:
GlobalMR should be able to analyze this function.
---
Diffs of the changes: (+20 -0)
chaining-analysis.ll | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+)
Index: llvm/test/Regression/Analysis/GlobalsModRef/chaining-analysis.ll
diff -c /dev/null llvm/test/Regression/Analysis/GlobalsModRef/chaining-analysis.ll:1.1
*** /dev/null Wed Mar 23 17:49:06 2005
--- llvm/test/Regression/Analysis/GlobalsModRef/chaining-analysis.ll Wed Mar 23 17:48:56 2005
***************
*** 0 ****
--- 1,20 ----
+ ; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
+
+ ; This test requires the use of previous analyses to determine that
+ ; doesnotmodX does not modify X (because 'sin' doesn't).
+
+ %X = internal global int 4
+
+ declare double %sin(double)
+
+ int %test(int *%P) {
+ store int 12, int* %X
+ call double %doesnotmodX(double 1.0)
+ %V = load int* %X
+ ret int %V
+ }
+
+ double %doesnotmodX(double %V) {
+ %V2 = call double %sin(double %V)
+ ret double %V2
+ }
More information about the llvm-commits
mailing list