[llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 24 09:57:59 PST 2005
Changes in directory llvm/test/Regression/Analysis/DSGraph:
2005-03-24-Global-Arg-Alias.ll added (r1.1)
---
Log message:
new testcase that DS-AA is causing to be miscompiled.
---
Diffs of the changes: (+26 -0)
2005-03-24-Global-Arg-Alias.ll | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+)
Index: llvm/test/Regression/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll
diff -c /dev/null llvm/test/Regression/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll:1.1
*** /dev/null Thu Mar 24 11:57:53 2005
--- llvm/test/Regression/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll Thu Mar 24 11:57:43 2005
***************
*** 0 ****
--- 1,26 ----
+ ; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int* %L'
+
+ %G = internal global int* null
+
+ int %caller(bool %P) {
+ %L = alloca int
+ call void %callee(bool %P, int* %L)
+
+ ;; At this point, G could point to L, so we can't eliminate these operations.
+ %GP = load int** %G
+ store int 17, int* %L
+ store int 18, int* %GP ;; might clober L
+
+ %A = load int* %L ;; is not necessarily 17!
+ ret int %A
+ }
+
+ internal void %callee(bool %Cond, int* %P) {
+ br bool %Cond, label %T, label %F
+ T:
+ store int* %P, int** %G
+ ret void
+ F:
+ ret void
+ }
+
More information about the llvm-commits
mailing list