diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-02-15 13:41:41 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-02-15 13:41:41 +0000 |
| commit | 02d3b6a82d4c89dd1f6e7eda551ced5c7330d6e7 (patch) | |
| tree | c5aa04ee6ee71f42a010ccd3d6a0dc1d4beeff67 | |
| parent | eda01dcd575625cc9b88d557351ed94b0d954951 (diff) | |
| download | bcm5719-llvm-02d3b6a82d4c89dd1f6e7eda551ced5c7330d6e7.tar.gz bcm5719-llvm-02d3b6a82d4c89dd1f6e7eda551ced5c7330d6e7.zip | |
[X86][SSE] Regenerated uint2fp special case tests
llvm-svn: 260888
| -rw-r--r-- | llvm/test/CodeGen/X86/uint_to_fp-2.ll | 13 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/uint_to_fp.ll | 33 |
2 files changed, 30 insertions, 16 deletions
diff --git a/llvm/test/CodeGen/X86/uint_to_fp-2.ll b/llvm/test/CodeGen/X86/uint_to_fp-2.ll index 4b594f7c62a..d2b78a8886f 100644 --- a/llvm/test/CodeGen/X86/uint_to_fp-2.ll +++ b/llvm/test/CodeGen/X86/uint_to_fp-2.ll @@ -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 diff --git a/llvm/test/CodeGen/X86/uint_to_fp.ll b/llvm/test/CodeGen/X86/uint_to_fp.ll index 0536eb05222..a2784fdcbbd 100644 --- a/llvm/test/CodeGen/X86/uint_to_fp.ll +++ b/llvm/test/CodeGen/X86/uint_to_fp.ll @@ -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 } |

