aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/DeadStoreElimination/alloca.llx8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/DeadStoreElimination/alloca.llx b/test/Transforms/DeadStoreElimination/alloca.llx
new file mode 100644
index 0000000..c75a618
--- /dev/null
+++ b/test/Transforms/DeadStoreElimination/alloca.llx
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+
+void %test(int* %Q) {
+ %P = alloca int
+ %DEAD = load int* %Q
+ store int %DEAD, int* %P ;; Alloca goes out of scope, dead store.
+ ret void
+}