Skip to content

Commit d6a9b7e

Browse files
committed
[Mips] Add FileCheck to a test that just tested for a crash.
I believe the generated code here can suffer from double rounding. So I wanted to capture the existing codegen so we can make decisions about how to fix it.
1 parent c751802 commit d6a9b7e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

llvm/test/CodeGen/Mips/uitofp.ll

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
1-
; RUN: llc -march=mips -mattr=+single-float < %s
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc -march=mips -mattr=+single-float < %s | FileCheck %s
23

34
define 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: lui $1, %hi($CPI0_0)
11+
; CHECK-NEXT: addiu $1, $1, %lo($CPI0_0)
12+
; CHECK-NEXT: lw $2, 4($sp)
13+
; CHECK-NEXT: srl $3, $2, 29
14+
; CHECK-NEXT: andi $3, $3, 4
15+
; CHECK-NEXT: addu $1, $1, $3
16+
; CHECK-NEXT: lwc1 $f0, 0($1)
17+
; CHECK-NEXT: mtc1 $2, $f1
18+
; CHECK-NEXT: cvt.s.w $f1, $f1
19+
; CHECK-NEXT: add.s $f0, $f1, $f0
20+
; CHECK-NEXT: swc1 $f0, 0($sp)
21+
; CHECK-NEXT: jr $ra
22+
; CHECK-NEXT: addiu $sp, $sp, 8
423
entry:
524
%b = alloca i32, align 4
625
%a = alloca float, align 4

0 commit comments

Comments
 (0)