summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-25 14:55:30 +0000
committerChris Lattner <sabre@nondot.org>2003-06-25 14:55:30 +0000
commitfec65d7526051bde5d1588900e01849f2ea10d70 (patch)
tree0096c8cea9bc677c6afcce3e325d1386a61cd3d3
parent0b3def4d4915fd9443fbdbc16da0aa01edf1e22d (diff)
downloadbcm5719-llvm-fec65d7526051bde5d1588900e01849f2ea10d70.tar.gz
bcm5719-llvm-fec65d7526051bde5d1588900e01849f2ea10d70.zip
New testcase
llvm-svn: 6900
-rw-r--r--llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll b/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
new file mode 100644
index 00000000000..61145387815
--- /dev/null
+++ b/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
@@ -0,0 +1,19 @@
+; Promoting some values allows promotion of other values.
+; RUN: if as < %s | opt -mem2reg | dis | grep alloca
+; RUN: then exit 1
+; RUN: else exit 0
+; RUN: fi
+
+int %test2() {
+ %result = alloca int ; ty=int*
+ %a = alloca int ; ty=int*
+ %p = alloca int* ; ty=int**
+ store int 0, int* %a
+ store int* %a, int** %p
+ %tmp.0 = load int** %p ; ty=int*
+ %tmp.1 = load int* %tmp.0 ; ty=int
+ store int %tmp.1, int* %result
+ %tmp.2 = load int* %result ; ty=int
+ ret int %tmp.2
+}
+
OpenPOWER on IntegriCloud