[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/alloca.ll

Chris Lattner sabre at nondot.org
Sun Jan 14 22:51:40 PST 2007



Changes in directory llvm/test/Regression/Transforms/InstCombine:

alloca.ll updated: 1.2 -> 1.3
---
Log message:

add a simple case where instcombine can detect and remove a dead alloca


---
Diffs of the changes:  (+13 -0)

 alloca.ll |   13 +++++++++++++
 1 files changed, 13 insertions(+)


Index: llvm/test/Regression/Transforms/InstCombine/alloca.ll
diff -u llvm/test/Regression/Transforms/InstCombine/alloca.ll:1.2 llvm/test/Regression/Transforms/InstCombine/alloca.ll:1.3
--- llvm/test/Regression/Transforms/InstCombine/alloca.ll:1.2	Fri Dec  1 22:23:09 2006
+++ llvm/test/Regression/Transforms/InstCombine/alloca.ll	Mon Jan 15 00:51:25 2007
@@ -12,3 +12,16 @@
 	call void(...)* %use({}* %Z)
 	ret void
 }
+
+void %test2() {
+	%A = alloca int    ;; dead.
+	store int 123, int* %A
+	ret void
+}
+
+void %test3() {
+	%A = alloca {int}    ;; dead.
+	%B = getelementptr {int}* %A, int 0, uint 0
+	store int 123, int* %B
+	ret void
+}






More information about the llvm-commits mailing list