summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-04-11 05:13:32 +0000
committerOwen Anderson <resistor@mac.com>2008-04-11 05:13:32 +0000
commit90bde997b3f2e5e20452dc01c6617833ce8697d5 (patch)
tree73ce63a966bdcaa37439cfb87be1873c72fa63d0
parent1e73f29a7fd80395078d8c9827657137d3f7b91e (diff)
downloadbcm5719-llvm-90bde997b3f2e5e20452dc01c6617833ce8697d5.tar.gz
bcm5719-llvm-90bde997b3f2e5e20452dc01c6617833ce8697d5.zip
Add testcase for PR2213.
llvm-svn: 49517
-rw-r--r--llvm/test/Transforms/GVN/call.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/GVN/call.ll b/llvm/test/Transforms/GVN/call.ll
new file mode 100644
index 00000000000..0a045c8bd50
--- /dev/null
+++ b/llvm/test/Transforms/GVN/call.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep tmp2
+; PR2213
+
+define i32* @f(i8* %x) {
+entry:
+ %tmp = call i8* @m( i32 12 ) ; <i8*> [#uses=2]
+ %tmp1 = bitcast i8* %tmp to i32* ; <i32*> [#uses=0]
+ %tmp2 = bitcast i8* %tmp to i32* ; <i32*> [#uses=0]
+ ret i32* %tmp2
+}
+
+declare i8* @m(i32)
OpenPOWER on IntegriCloud