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: movsd {{.*#+}} xmm0 = mem[0],zero
10 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
11 ; CHECK-NEXT: orpd %xmm0, %xmm1
12 ; CHECK-NEXT: subsd %xmm0, %xmm1
13 ; CHECK-NEXT: xorps %xmm0, %xmm0
14 ; CHECK-NEXT: cvtsd2ss %xmm1, %xmm0
15 ; CHECK-NEXT: movss %xmm0, (%esp)
16 ; CHECK-NEXT: flds (%esp)
17 ; CHECK-NEXT: popl %eax
20 %0 = uitofp i32 %x to float
25 define float @test2(<4 x i32> %x) nounwind readnone ssp {
27 ; CHECK: # %bb.0: # %entry
28 ; CHECK-NEXT: pushl %eax
29 ; CHECK-NEXT: xorps %xmm1, %xmm1
30 ; CHECK-NEXT: movss {{.*#+}} xmm1 = xmm0[0],xmm1[1,2,3]
31 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
32 ; CHECK-NEXT: orps %xmm0, %xmm1
33 ; CHECK-NEXT: subsd %xmm0, %xmm1
34 ; CHECK-NEXT: xorps %xmm0, %xmm0
35 ; CHECK-NEXT: cvtsd2ss %xmm1, %xmm0
36 ; CHECK-NEXT: movss %xmm0, (%esp)
37 ; CHECK-NEXT: flds (%esp)
38 ; CHECK-NEXT: popl %eax
41 %vecext = extractelement <4 x i32> %x, i32 0
42 %conv = uitofp i32 %vecext to float