[X86][SSE] Regenerated uint2fp special case tests

llvm-svn: 260888
This commit is contained in:
Simon Pilgrim 2016-02-15 13:41:41 +00:00
parent eda01dcd57
commit 02d3b6a82d
2 changed files with 30 additions and 16 deletions

View File

@ -1,3 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i386-unknown-unknown -march=x86 -mattr=+sse2 | FileCheck %s
; rdar://6504833
@ -5,8 +6,8 @@ define float @test1(i32 %x) nounwind readnone {
; CHECK-LABEL: test1:
; CHECK: # BB#0: # %entry
; CHECK-NEXT: pushl %eax
; CHECK-NEXT: movsd .LCPI0_0, %xmm0
; CHECK-NEXT: movd {{[0-9]+}}(%esp), %xmm1
; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; CHECK-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
; CHECK-NEXT: orpd %xmm0, %xmm1
; CHECK-NEXT: subsd %xmm0, %xmm1
; CHECK-NEXT: xorps %xmm0, %xmm0
@ -16,8 +17,8 @@ define float @test1(i32 %x) nounwind readnone {
; CHECK-NEXT: popl %eax
; CHECK-NEXT: retl
entry:
%0 = uitofp i32 %x to float
ret float %0
%0 = uitofp i32 %x to float
ret float %0
}
; PR10802
@ -26,8 +27,8 @@ define float @test2(<4 x i32> %x) nounwind readnone ssp {
; CHECK: # BB#0: # %entry
; CHECK-NEXT: pushl %eax
; CHECK-NEXT: xorps %xmm1, %xmm1
; CHECK-NEXT: movss %xmm0, %xmm1
; CHECK-NEXT: movsd .LCPI1_0, %xmm0
; CHECK-NEXT: movss {{.*#+}} xmm1 = xmm0[0],xmm1[1,2,3]
; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; CHECK-NEXT: orps %xmm0, %xmm1
; CHECK-NEXT: subsd %xmm0, %xmm1
; CHECK-NEXT: xorps %xmm0, %xmm0

View File

@ -1,14 +1,27 @@
; RUN: llc < %s -march=x86 -mcpu=yonah | not grep "sub.*esp"
; RUN: llc < %s -march=x86 -mcpu=yonah | grep cvtsi2ss
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i386-apple-darwin8 -mattr=+sse2 | FileCheck %s --check-prefix=X32
; RUN: llc < %s -mtriple=x86_64-apple-darwin8 -mattr=+sse2 | FileCheck %s --check-prefix=X64
; rdar://6034396
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin8"
define void @test(i32 %x, float* %y) nounwind {
define void @test(i32 %x, float* %y) nounwind {
; X32-LABEL: test:
; X32: ## BB#0: ## %entry
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X32-NEXT: shrl $23, %ecx
; X32-NEXT: cvtsi2ssl %ecx, %xmm0
; X32-NEXT: movss %xmm0, (%eax)
; X32-NEXT: retl
;
; X64-LABEL: test:
; X64: ## BB#0: ## %entry
; X64-NEXT: shrl $23, %edi
; X64-NEXT: cvtsi2ssl %edi, %xmm0
; X64-NEXT: movss %xmm0, (%rsi)
; X64-NEXT: retq
entry:
lshr i32 %x, 23 ; <i32>:0 [#uses=1]
uitofp i32 %0 to float ; <float>:1 [#uses=1]
store float %1, float* %y
ret void
lshr i32 %x, 23
uitofp i32 %0 to float
store float %1, float* %y
ret void
}