summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-07 22:52:41 +0000
committerChris Lattner <sabre@nondot.org>2004-03-07 22:52:41 +0000
commit332a8bdf316bc79b9be0119132b93656e9a2d63b (patch)
treeb5a4fc28edc9054f097aa462b05380349ee1a23c /llvm
parent64b8d697ad7240aae6caee59c3d75391f4b6a0c1 (diff)
downloadbcm5719-llvm-332a8bdf316bc79b9be0119132b93656e9a2d63b.tar.gz
bcm5719-llvm-332a8bdf316bc79b9be0119132b93656e9a2d63b.zip
New testcase for missed case
llvm-svn: 12199
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Regression/Transforms/ArgumentPromotion/chained.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/ArgumentPromotion/chained.ll b/llvm/test/Regression/Transforms/ArgumentPromotion/chained.ll
new file mode 100644
index 00000000000..3adfbf9d849
--- /dev/null
+++ b/llvm/test/Regression/Transforms/ArgumentPromotion/chained.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | opt -argpromotion -instcombine | llvm-dis | not grep load
+
+%G1 = constant int 0
+%G2 = constant int* %G1
+
+implementation
+
+internal int %test(int **%X) {
+ %Y = load int** %X
+ %X = load int* %Y
+ ret int %X
+}
+
+int %caller(int** %P) {
+ %X = call int %test(int** %G2)
+ ret int %X
+}
OpenPOWER on IntegriCloud