diff options
author | Craig Topper <craig.topper@gmail.com> | 2016-07-03 19:37:12 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2016-07-03 19:37:12 +0000 |
commit | d1eca0f32ca5b85af6d17174a2824657a2eeb41b (patch) | |
tree | d3c733b3c69f239192786bf20fdd495b504e3031 /llvm/test/CodeGen/X86/combine-or.ll | |
parent | 8e826d5abe6131d1de94f8ac0eb42ce66862cd7b (diff) | |
download | bcm5719-llvm-d1eca0f32ca5b85af6d17174a2824657a2eeb41b.tar.gz bcm5719-llvm-d1eca0f32ca5b85af6d17174a2824657a2eeb41b.zip |
[CodeGen] Teach OR combine of shuffles involving zero vectors to better handle undef indices.
Undef indices can now be treated as zeros. Or if its undef ORed with zero, we will keep the undef.
llvm-svn: 274472
Diffstat (limited to 'llvm/test/CodeGen/X86/combine-or.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/combine-or.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/combine-or.ll b/llvm/test/CodeGen/X86/combine-or.ll index fdca611c56c..5cbd74980ca 100644 --- a/llvm/test/CodeGen/X86/combine-or.ll +++ b/llvm/test/CodeGen/X86/combine-or.ll @@ -397,10 +397,7 @@ define <4 x i32> @test2d(<4 x i32> %a, <4 x i32> %b) { define <4 x i32> @test2e(<4 x i32> %a, <4 x i32> %b) { ; CHECK-LABEL: test2e: ; CHECK: # BB#0: -; CHECK-NEXT: pxor %xmm2, %xmm2 -; CHECK-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0,1],xmm2[2,3],xmm0[4,5,6,7] -; CHECK-NEXT: movq {{.*#+}} xmm1 = xmm1[0],zero -; CHECK-NEXT: por %xmm1, %xmm0 +; CHECK-NEXT: pblendw {{.*#+}} xmm0 = xmm1[0,1,2,3],xmm0[4,5,6,7] ; CHECK-NEXT: retq %shuf1 = shufflevector <4 x i32> %a, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>, <4 x i32><i32 undef, i32 4, i32 2, i32 3> %shuf2 = shufflevector <4 x i32> %b, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>, <4 x i32><i32 0, i32 1, i32 4, i32 4> @@ -411,8 +408,7 @@ define <4 x i32> @test2e(<4 x i32> %a, <4 x i32> %b) { define <4 x i32> @test2f(<4 x i32> %a, <4 x i32> %b) { ; CHECK-LABEL: test2f: ; CHECK: # BB#0: -; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3] -; CHECK-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3],xmm0[4,5,6,7] +; CHECK-NEXT: pblendw {{.*#+}} xmm0 = xmm1[0,1,2,3],xmm0[4,5,6,7] ; CHECK-NEXT: retq %shuf1 = shufflevector <4 x i32> %a, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>, <4 x i32><i32 4, i32 4, i32 2, i32 3> %shuf2 = shufflevector <4 x i32> %b, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>, <4 x i32><i32 undef, i32 1, i32 4, i32 4> |