diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/combine-add-ssat.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/combine-add-ssat.ll | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/test/CodeGen/X86/combine-add-ssat.ll b/llvm/test/CodeGen/X86/combine-add-ssat.ll index bd06ae9de64..c2612530558 100644 --- a/llvm/test/CodeGen/X86/combine-add-ssat.ll +++ b/llvm/test/CodeGen/X86/combine-add-ssat.ll @@ -15,13 +15,7 @@ declare <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16>, <8 x i16>) define i32 @combine_undef_i32(i32 %a0) { ; CHECK-LABEL: combine_undef_i32: ; CHECK: # %bb.0: -; CHECK-NEXT: xorl %eax, %eax -; CHECK-NEXT: movl %edi, %ecx -; CHECK-NEXT: addl %eax, %ecx -; CHECK-NEXT: setns %al -; CHECK-NEXT: addl $2147483647, %eax # imm = 0x7FFFFFFF -; CHECK-NEXT: addl %eax, %edi -; CHECK-NEXT: cmovnol %edi, %eax +; CHECK-NEXT: movl $-1, %eax ; CHECK-NEXT: retq %res = call i32 @llvm.sadd.sat.i32(i32 %a0, i32 undef) ret i32 %res @@ -30,12 +24,12 @@ define i32 @combine_undef_i32(i32 %a0) { define <8 x i16> @combine_undef_v8i16(<8 x i16> %a0) { ; SSE-LABEL: combine_undef_v8i16: ; SSE: # %bb.0: -; SSE-NEXT: paddsw %xmm0, %xmm0 +; SSE-NEXT: pcmpeqd %xmm0, %xmm0 ; SSE-NEXT: retq ; ; AVX-LABEL: combine_undef_v8i16: ; AVX: # %bb.0: -; AVX-NEXT: vpaddsw %xmm0, %xmm0, %xmm0 +; AVX-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0 ; AVX-NEXT: retq %res = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> undef, <8 x i16> %a0) ret <8 x i16> %res @@ -68,14 +62,12 @@ define <8 x i16> @combine_constfold_v8i16() { define <8 x i16> @combine_constfold_undef_v8i16() { ; SSE-LABEL: combine_constfold_undef_v8i16: ; SSE: # %bb.0: -; SSE-NEXT: movdqa {{.*#+}} xmm0 = <u,1,u,65535,65535,65281,32776,1> -; SSE-NEXT: paddsw {{.*}}(%rip), %xmm0 +; SSE-NEXT: movaps {{.*#+}} xmm0 = [65535,65535,65535,65534,0,65280,32768,0] ; SSE-NEXT: retq ; ; AVX-LABEL: combine_constfold_undef_v8i16: ; AVX: # %bb.0: -; AVX-NEXT: vmovdqa {{.*#+}} xmm0 = <u,1,u,65535,65535,65281,32776,1> -; AVX-NEXT: vpaddsw {{.*}}(%rip), %xmm0, %xmm0 +; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [65535,65535,65535,65534,0,65280,32768,0] ; AVX-NEXT: retq %res = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> <i16 undef, i16 1, i16 undef, i16 65535, i16 -1, i16 -255, i16 -32760, i16 1>, <8 x i16> <i16 1, i16 undef, i16 undef, i16 65535, i16 1, i16 65535, i16 -10, i16 65535>) ret <8 x i16> %res |

