summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/uint_to_fp-2.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/uint_to_fp-2.ll')
-rw-r--r--test/CodeGen/X86/uint_to_fp-2.ll31
1 files changed, 28 insertions, 3 deletions
diff --git a/test/CodeGen/X86/uint_to_fp-2.ll b/test/CodeGen/X86/uint_to_fp-2.ll
index da5105d..7536fb8 100644
--- a/test/CodeGen/X86/uint_to_fp-2.ll
+++ b/test/CodeGen/X86/uint_to_fp-2.ll
@@ -1,8 +1,33 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep movsd | count 1
-; rdar://6504833
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
-define float @f(i32 %x) nounwind readnone {
+; rdar://6504833
+define float @test1(i32 %x) nounwind readnone {
+; CHECK: test1
+; CHECK: movd
+; CHECK: orpd
+; 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
+}
OpenPOWER on IntegriCloud