1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+sse2 | FileCheck %s
5 define float @test1(i32 %x) nounwind readnone {
7 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: pushl %eax
9 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
10 ; CHECK-NEXT: orpd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
11 ; CHECK-NEXT: subsd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
12 ; CHECK-NEXT: cvtsd2ss %xmm0, %xmm0
13 ; CHECK-NEXT: movss %xmm0, (%esp)
14 ; CHECK-NEXT: flds (%esp)
15 ; CHECK-NEXT: popl %eax
18 %0 = uitofp i32 %x to float
23 define float @test2(<4 x i32> %x) nounwind readnone ssp {
25 ; CHECK: # %bb.0: # %entry
26 ; CHECK-NEXT: pushl %eax
27 ; CHECK-NEXT: xorps %xmm1, %xmm1
28 ; CHECK-NEXT: movss {{.*#+}} xmm1 = xmm0[0],xmm1[1,2,3]
29 ; CHECK-NEXT: orps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm1
30 ; CHECK-NEXT: subsd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm1
31 ; CHECK-NEXT: xorps %xmm0, %xmm0
32 ; CHECK-NEXT: cvtsd2ss %xmm1, %xmm0
33 ; CHECK-NEXT: movss %xmm0, (%esp)
34 ; CHECK-NEXT: flds (%esp)
35 ; CHECK-NEXT: popl %eax
38 %vecext = extractelement <4 x i32> %x, i32 0
39 %conv = uitofp i32 %vecext to float