• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i386-apple-darwin8 -mattr=+sse2 | FileCheck %s --check-prefix=X32
3; RUN: llc < %s -mtriple=x86_64-apple-darwin8 -mattr=+sse2 | FileCheck %s --check-prefix=X64
4; rdar://6034396
5
6define void @test(i32 %x, float* %y) nounwind {
7; X32-LABEL: test:
8; X32:       ## %bb.0: ## %entry
9; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
10; X32-NEXT:    movl {{[0-9]+}}(%esp), %ecx
11; X32-NEXT:    shrl $23, %ecx
12; X32-NEXT:    cvtsi2ss %ecx, %xmm0
13; X32-NEXT:    movss %xmm0, (%eax)
14; X32-NEXT:    retl
15;
16; X64-LABEL: test:
17; X64:       ## %bb.0: ## %entry
18; X64-NEXT:    shrl $23, %edi
19; X64-NEXT:    cvtsi2ss %edi, %xmm0
20; X64-NEXT:    movss %xmm0, (%rsi)
21; X64-NEXT:    retq
22entry:
23  lshr i32 %x, 23
24  uitofp i32 %0 to float
25  store float %1, float* %y
26  ret void
27}
28