@@ -52,19 +52,15 @@ define float @test_with_nneg(i32 %x) nounwind {
52
52
; X86-LABEL: test_with_nneg:
53
53
; X86: ## %bb.0:
54
54
; 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
59
56
; X86-NEXT: movss %xmm0, (%esp)
60
57
; X86-NEXT: flds (%esp)
61
58
; X86-NEXT: popl %eax
62
59
; X86-NEXT: retl
63
60
;
64
61
; X64-LABEL: test_with_nneg:
65
62
; X64: ## %bb.0:
66
- ; X64-NEXT: movl %edi, %eax
67
- ; X64-NEXT: cvtsi2ss %rax, %xmm0
63
+ ; X64-NEXT: cvtsi2ss %edi, %xmm0
68
64
; X64-NEXT: retq
69
65
%r = uitofp nneg i32 %x to float
70
66
ret float %r
@@ -73,24 +69,12 @@ define float @test_with_nneg(i32 %x) nounwind {
73
69
define <4 x float > @test_with_nneg_vec (<4 x i32 > %x ) nounwind {
74
70
; X86-LABEL: test_with_nneg_vec:
75
71
; 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
83
73
; X86-NEXT: retl
84
74
;
85
75
; X64-LABEL: test_with_nneg_vec:
86
76
; 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
94
78
; X64-NEXT: retq
95
79
%r = uitofp nneg <4 x i32 > %x to <4 x float >
96
80
ret <4 x float > %r
0 commit comments