summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-12 01:19:22 +0000
committerChris Lattner <sabre@nondot.org>2010-07-12 01:19:22 +0000
commit25eea4db66c89474216150e623a8740eeb020865 (patch)
tree4b06ea4cd0fb3749c9a45f2e0d9b33fb980011e9 /llvm/test
parent601e390a3b1bd2807f2e87a8ca3df45cf3ed8664 (diff)
downloadbcm5719-llvm-25eea4db66c89474216150e623a8740eeb020865.tar.gz
bcm5719-llvm-25eea4db66c89474216150e623a8740eeb020865.zip
fix PR7311 by avoiding breaking casts when a bitcast from scalar->vector
is involved. llvm-svn: 108117
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/cast.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll
index 77fccdfa52d..102d2f048f1 100644
--- a/llvm/test/Transforms/InstCombine/cast.ll
+++ b/llvm/test/Transforms/InstCombine/cast.ll
@@ -638,3 +638,14 @@ define <4 x i32> @test62(<3 x float> %call4) nounwind {
; CHECK-NEXT: ret
}
+; PR7311 - Don't create invalid IR on scalar->vector cast.
+define <2 x float> @test63(i64 %tmp8) nounwind {
+entry:
+ %a = bitcast i64 %tmp8 to <2 x i32>
+ %vcvt.i = uitofp <2 x i32> %a to <2 x float>
+ ret <2 x float> %vcvt.i
+; CHECK: @test63
+; CHECK: bitcast
+; CHECK: uitofp
+}
+
OpenPOWER on IntegriCloud