diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-01-03 21:05:52 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-01-03 21:05:52 +0000 |
commit | 3d1161e9ae2aedc45f40cc1b7be1db3df2094903 (patch) | |
tree | cf714d336559b62eb8f0a7f36a1fd9ce35035bf5 /test/CodeGen/X86/avx-shuffle.ll | |
parent | 48a09aec60c5daf67430811e24256d501a576766 (diff) | |
download | external_llvm-3d1161e9ae2aedc45f40cc1b7be1db3df2094903.zip external_llvm-3d1161e9ae2aedc45f40cc1b7be1db3df2094903.tar.gz external_llvm-3d1161e9ae2aedc45f40cc1b7be1db3df2094903.tar.bz2 |
Enhance DAGCombine for transforming 128->256 casts into a vmovaps, rather
then a vxorps + vinsertf128 pair if the original vector came from a load.
rdar://10594409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-shuffle.ll')
-rw-r--r-- | test/CodeGen/X86/avx-shuffle.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-shuffle.ll b/test/CodeGen/X86/avx-shuffle.ll index 8532b40..ad611fc 100644 --- a/test/CodeGen/X86/avx-shuffle.ll +++ b/test/CodeGen/X86/avx-shuffle.ll @@ -31,4 +31,27 @@ define <8 x float> @test4(float %a) nounwind { ret <8 x float> %b ; CHECK: test4: ; CHECK: vinsertf128 +} + +; rdar://10594409 +define <8 x float> @test5(float* nocapture %f) nounwind uwtable readonly ssp { +entry: + %0 = bitcast float* %f to <4 x float>* + %1 = load <4 x float>* %0, align 16 +; CHECK: vmovaps +; CHECK-NOT: vxorps +; CHECK-NOT: vinsertf128 + %shuffle.i = shufflevector <4 x float> %1, <4 x float> <float 0.000000e+00, float undef, float undef, float undef>, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 4, i32 4, i32 4> + ret <8 x float> %shuffle.i +} + +define <4 x double> @test6(double* nocapture %d) nounwind uwtable readonly ssp { +entry: + %0 = bitcast double* %d to <2 x double>* + %1 = load <2 x double>* %0, align 16 +; CHECK: vmovaps +; CHECK-NOT: vxorps +; CHECK-NOT: vinsertf128 + %shuffle.i = shufflevector <2 x double> %1, <2 x double> <double 0.000000e+00, double undef>, <4 x i32> <i32 0, i32 1, i32 2, i32 2> + ret <4 x double> %shuffle.i }
\ No newline at end of file |