aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ScalarRepl
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-04-20 21:48:38 +0000
committerCameron Zwarich <zwarich@apple.com>2011-04-20 21:48:38 +0000
commit344731c01805aeda49c747bac6148501fa85557c (patch)
tree7b88c6fca816dff3f9df8f3c822e5a3d762f136e /test/Transforms/ScalarRepl
parentc5c43b958cf2f251c836f94d4499adb6296f0611 (diff)
downloadexternal_llvm-344731c01805aeda49c747bac6148501fa85557c.zip
external_llvm-344731c01805aeda49c747bac6148501fa85557c.tar.gz
external_llvm-344731c01805aeda49c747bac6148501fa85557c.tar.bz2
Fix another case of <rdar://problem/9184212> that only occurs with code
generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float vector on ARM rather than an i64 array like Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ScalarRepl')
-rw-r--r--test/Transforms/ScalarRepl/vector_promote.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/vector_promote.ll b/test/Transforms/ScalarRepl/vector_promote.ll
index 9c17a54..c51ef10 100644
--- a/test/Transforms/ScalarRepl/vector_promote.ll
+++ b/test/Transforms/ScalarRepl/vector_promote.ll
@@ -248,3 +248,18 @@ entry:
; CHECK: shufflevector <4 x i64> %tmpV2, <4 x i64> undef, <3 x i32> <i32 0, i32 1, i32 2>
}
+define <4 x float> @test16(<4 x float> %x, i64 %y0, i64 %y1) {
+entry:
+ %tmp8 = bitcast <4 x float> undef to <2 x double>
+ %tmp9 = bitcast i64 %y0 to double
+ %tmp10 = insertelement <2 x double> %tmp8, double %tmp9, i32 0
+ %tmp11 = bitcast <2 x double> %tmp10 to <4 x float>
+ %tmp3 = bitcast <4 x float> %tmp11 to <2 x double>
+ %tmp4 = bitcast i64 %y1 to double
+ %tmp5 = insertelement <2 x double> %tmp3, double %tmp4, i32 1
+ %tmp6 = bitcast <2 x double> %tmp5 to <4 x float>
+ ret <4 x float> %tmp6
+; CHECK: @test16
+; CHECK-NOT: alloca
+; CHECK: bitcast <4 x float> %tmp11 to <2 x double>
+}