[llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2004-03-10-ElimLoad.ll 2004-03-10-NoElimLoad.ll
Misha Brukman
brukman at cs.uiuc.edu
Fri Mar 12 00:18:03 PST 2004
Changes in directory llvm/test/Regression/Analysis/DSGraph:
2004-03-10-ElimLoad.ll updated: 1.1 -> 1.2
2004-03-10-NoElimLoad.ll updated: 1.1 -> 1.2
---
Log message:
Test the mod/ref analysis in DSA.
---
Diffs of the changes: (+27 -0)
Index: llvm/test/Regression/Analysis/DSGraph/2004-03-10-ElimLoad.ll
diff -u /dev/null llvm/test/Regression/Analysis/DSGraph/2004-03-10-ElimLoad.ll:1.2
--- /dev/null Fri Mar 12 00:17:32 2004
+++ llvm/test/Regression/Analysis/DSGraph/2004-03-10-ElimLoad.ll Fri Mar 12 00:17:22 2004
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+
+void %bar(int* %p) {
+ ret void
+}
+
+int %foo(int* %a) {
+ %b = load int* %a
+ call void %bar(int* %a)
+ %d = load int* %a
+ %e = sub int %b, %d
+ ret int %e
+}
Index: llvm/test/Regression/Analysis/DSGraph/2004-03-10-NoElimLoad.ll
diff -u /dev/null llvm/test/Regression/Analysis/DSGraph/2004-03-10-NoElimLoad.ll:1.2
--- /dev/null Fri Mar 12 00:17:32 2004
+++ llvm/test/Regression/Analysis/DSGraph/2004-03-10-NoElimLoad.ll Fri Mar 12 00:17:22 2004
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | grep sub
+
+void %bar(int* %p) {
+ store int 15, int* %p
+ ret void
+}
+
+int %foo(int* %a) {
+ %b = load int* %a
+ call void %bar(int* %a)
+ %d = load int* %a
+ %e = sub int %b, %d
+ ret int %e
+}
More information about the llvm-commits
mailing list