1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=mips-- | FileCheck %s
4 define i32 @fptoint(float %a) nounwind {
5 ; CHECK-LABEL: fptoint:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: trunc.w.s $f0, $f12
9 ; CHECK-NEXT: mfc1 $2, $f0
11 fptosi float %a to i32 ; <i32>:0 [#uses=1]
15 define i32 @fptouint(float %a) nounwind {
16 ; CHECK-LABEL: fptouint:
17 ; CHECK: # %bb.0: # %entry
18 ; CHECK-NEXT: lui $1, %hi($CPI1_0)
19 ; CHECK-NEXT: lwc1 $f0, %lo($CPI1_0)($1)
20 ; CHECK-NEXT: sub.s $f1, $f12, $f0
21 ; CHECK-NEXT: trunc.w.s $f1, $f1
22 ; CHECK-NEXT: mfc1 $1, $f1
23 ; CHECK-NEXT: lui $2, 32768
24 ; CHECK-NEXT: xor $2, $1, $2
25 ; CHECK-NEXT: trunc.w.s $f1, $f12
26 ; CHECK-NEXT: mfc1 $1, $f1
27 ; CHECK-NEXT: c.olt.s $f12, $f0
29 ; CHECK-NEXT: movt $2, $1, $fcc0
31 fptoui float %a to i32 ; <i32>:0 [#uses=1]