diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-10-26 18:27:55 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-10-26 18:27:55 +0000 |
| commit | ac50f3e9071eaeef20104ec4bb8a4ad588d55443 (patch) | |
| tree | f1f80e2c90dee80b72d233d460d3e17d5f2cbb78 /llvm/test/CodeGen/X86/buildvec-insertvec.ll | |
| parent | 1c45b09add3b9a254af8b85c9cbc37f16fc34f92 (diff) | |
| download | bcm5719-llvm-ac50f3e9071eaeef20104ec4bb8a4ad588d55443.tar.gz bcm5719-llvm-ac50f3e9071eaeef20104ec4bb8a4ad588d55443.zip | |
[x86] use an insert op to put one variable element into a constant of vectors
Instead of loading (a potential ton of) scalar constants, load those as a vector and then insert into it.
Differential Revision: https://reviews.llvm.org/D38756
llvm-svn: 316685
Diffstat (limited to 'llvm/test/CodeGen/X86/buildvec-insertvec.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/buildvec-insertvec.ll | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/X86/buildvec-insertvec.ll b/llvm/test/CodeGen/X86/buildvec-insertvec.ll index 5c508b24f95..5c4e2120924 100644 --- a/llvm/test/CodeGen/X86/buildvec-insertvec.ll +++ b/llvm/test/CodeGen/X86/buildvec-insertvec.ll @@ -60,11 +60,20 @@ entry: ret <4 x float> %5 } +; FIXME: This could be 'movhpd {{.*#+}} xmm0 = xmm0[0],mem[0]'. + define <2 x double> @test_negative_zero_2(<2 x double> %A) { -; CHECK-LABEL: test_negative_zero_2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: movhpd {{.*#+}} xmm0 = xmm0[0],mem[0] -; CHECK-NEXT: retq +; SSE2-LABEL: test_negative_zero_2: +; SSE2: # BB#0: # %entry +; SSE2-NEXT: movapd {{.*#+}} xmm1 = <u,-0> +; SSE2-NEXT: movsd {{.*#+}} xmm1 = xmm0[0],xmm1[1] +; SSE2-NEXT: movapd %xmm1, %xmm0 +; SSE2-NEXT: retq +; +; SSE41-LABEL: test_negative_zero_2: +; SSE41: # BB#0: # %entry +; SSE41-NEXT: blendpd {{.*#+}} xmm0 = xmm0[0],mem[1] +; SSE41-NEXT: retq entry: %0 = extractelement <2 x double> %A, i32 0 %1 = insertelement <2 x double> undef, double %0, i32 0 |

