• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -march=mips -mattr=+single-float < %s | FileCheck %s
3
4define void @f0() nounwind {
5; CHECK-LABEL: f0:
6; CHECK:       # %bb.0: # %entry
7; CHECK-NEXT:    addiu $sp, $sp, -8
8; CHECK-NEXT:    addiu $1, $zero, 1
9; CHECK-NEXT:    sw $1, 4($sp)
10; CHECK-NEXT:    lw $1, 4($sp)
11; CHECK-NEXT:    srl $2, $1, 1
12; CHECK-NEXT:    andi $3, $1, 1
13; CHECK-NEXT:    or $2, $3, $2
14; CHECK-NEXT:    mtc1 $2, $f0
15; CHECK-NEXT:    cvt.s.w $f0, $f0
16; CHECK-NEXT:    add.s $f0, $f0, $f0
17; CHECK-NEXT:    mtc1 $1, $f1
18; CHECK-NEXT:    cvt.s.w $f1, $f1
19; CHECK-NEXT:    slti $1, $1, 0
20; CHECK-NEXT:    movn.s $f1, $f0, $1
21; CHECK-NEXT:    swc1 $f1, 0($sp)
22; CHECK-NEXT:    jr $ra
23; CHECK-NEXT:    addiu $sp, $sp, 8
24entry:
25  %b = alloca i32, align 4
26  %a = alloca float, align 4
27  store volatile i32 1, i32* %b, align 4
28  %0 = load volatile i32, i32* %b, align 4
29  %conv = uitofp i32 %0 to float
30  store float %conv, float* %a, align 4
31  ret void
32}
33