@@ -52,19 +52,15 @@ define float @test_with_nneg(i32 %x) nounwind {
5252; X86-LABEL: test_with_nneg:
5353; X86: ## %bb.0:
5454; X86-NEXT: pushl %eax
55- ; X86-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
56- ; X86-NEXT: orpd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
57- ; X86-NEXT: subsd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
58- ; X86-NEXT: cvtsd2ss %xmm0, %xmm0
55+ ; X86-NEXT: cvtsi2ssl {{[0-9]+}}(%esp), %xmm0
5956; X86-NEXT: movss %xmm0, (%esp)
6057; X86-NEXT: flds (%esp)
6158; X86-NEXT: popl %eax
6259; X86-NEXT: retl
6360;
6461; X64-LABEL: test_with_nneg:
6562; X64: ## %bb.0:
66- ; X64-NEXT: movl %edi, %eax
67- ; X64-NEXT: cvtsi2ss %rax, %xmm0
63+ ; X64-NEXT: cvtsi2ss %edi, %xmm0
6864; X64-NEXT: retq
6965 %r = uitofp nneg i32 %x to float
7066 ret float %r
@@ -73,24 +69,12 @@ define float @test_with_nneg(i32 %x) nounwind {
7369define <4 x float > @test_with_nneg_vec (<4 x i32 > %x ) nounwind {
7470; X86-LABEL: test_with_nneg_vec:
7571; X86: ## %bb.0:
76- ; X86-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
77- ; X86-NEXT: pand %xmm0, %xmm1
78- ; X86-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}, %xmm1
79- ; X86-NEXT: psrld $16, %xmm0
80- ; X86-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
81- ; X86-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
82- ; X86-NEXT: addps %xmm1, %xmm0
72+ ; X86-NEXT: cvtdq2ps %xmm0, %xmm0
8373; X86-NEXT: retl
8474;
8575; X64-LABEL: test_with_nneg_vec:
8676; X64: ## %bb.0:
87- ; X64-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
88- ; X64-NEXT: pand %xmm0, %xmm1
89- ; X64-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
90- ; X64-NEXT: psrld $16, %xmm0
91- ; X64-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
92- ; X64-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
93- ; X64-NEXT: addps %xmm1, %xmm0
77+ ; X64-NEXT: cvtdq2ps %xmm0, %xmm0
9478; X64-NEXT: retq
9579 %r = uitofp nneg <4 x i32 > %x to <4 x float >
9680 ret <4 x float > %r
0 commit comments