view test/CodeGen/X86/uint_to_fp-2.ll @ 33:e4204d083e25

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children 60c9769439b8
line wrap: on
line source

; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s

; rdar://6504833
define float @test1(i32 %x) nounwind readnone {
; CHECK: test1
; CHECK: movd
; CHECK: orps
; CHECK: subsd
; CHECK: cvtsd2ss
; CHECK: movss
; CHECK: flds
; CHECK: ret
entry:
	%0 = uitofp i32 %x to float
	ret float %0
}

; PR10802
define float @test2(<4 x i32> %x) nounwind readnone ssp {
; CHECK: test2
; CHECK: xorps [[ZERO:%xmm[0-9]+]]
; CHECK: movss {{.*}}, [[ZERO]]
; CHECK: orps
; CHECK: subsd
; CHECK: cvtsd2ss
; CHECK: movss
; CHECK: flds
; CHECK: ret
entry:
  %vecext = extractelement <4 x i32> %x, i32 0
  %conv = uitofp i32 %vecext to float
  ret float %conv
}