diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-04-07 10:40:01 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-04-07 10:40:01 +0000 |
commit | 07adb6abdadfed379a9998e53beb82ce1e253b0e (patch) | |
tree | a1656b1a8d452b69f8cd08a3767a00526756e571 /llvm/test/CodeGen/X86/bitcast-setcc-128.ll | |
parent | 47a7662e29b669358e8b8d193f59e5c8d68568e8 (diff) | |
download | bcm5719-llvm-07adb6abdadfed379a9998e53beb82ce1e253b0e.tar.gz bcm5719-llvm-07adb6abdadfed379a9998e53beb82ce1e253b0e.zip |
[X86][SSE] SimplifyDemandedBitsForTargetNode - Add initial PACKSS support
In the case where we only want the sign bit (e.g. when using PACKSS truncation of comparison results for MOVMSK) then we can just demand the sign bit of the source operands.
This makes use of the fact that PACKSS saturates out of range values to the min/max int values - so the sign bit is always preserved.
Differential Revision: https://reviews.llvm.org/D60333
llvm-svn: 357859
Diffstat (limited to 'llvm/test/CodeGen/X86/bitcast-setcc-128.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/bitcast-setcc-128.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/bitcast-setcc-128.ll b/llvm/test/CodeGen/X86/bitcast-setcc-128.ll index e9dea85e14d..0a44e791b92 100644 --- a/llvm/test/CodeGen/X86/bitcast-setcc-128.ll +++ b/llvm/test/CodeGen/X86/bitcast-setcc-128.ll @@ -765,17 +765,13 @@ define void @bitcast_16i8_store(i16* %p, <16 x i8> %a0) { define void @bitcast_8i16_store(i8* %p, <8 x i16> %a0) { ; SSE2-SSSE3-LABEL: bitcast_8i16_store: ; SSE2-SSSE3: # %bb.0: -; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm1 -; SSE2-SSSE3-NEXT: pcmpgtw %xmm0, %xmm1 -; SSE2-SSSE3-NEXT: packsswb %xmm0, %xmm1 -; SSE2-SSSE3-NEXT: pmovmskb %xmm1, %eax +; SSE2-SSSE3-NEXT: packsswb %xmm0, %xmm0 +; SSE2-SSSE3-NEXT: pmovmskb %xmm0, %eax ; SSE2-SSSE3-NEXT: movb %al, (%rdi) ; SSE2-SSSE3-NEXT: retq ; ; AVX12-LABEL: bitcast_8i16_store: ; AVX12: # %bb.0: -; AVX12-NEXT: vpxor %xmm1, %xmm1, %xmm1 -; AVX12-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0 ; AVX12-NEXT: vpacksswb %xmm0, %xmm0, %xmm0 ; AVX12-NEXT: vpmovmskb %xmm0, %eax ; AVX12-NEXT: movb %al, (%rdi) |