1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefix=RV32IFD %s
5 define double @test(double %a) nounwind {
12 ; This previously failed complaining of multiple vreg defs due to an ABI
15 define i32 @main() nounwind {
16 ; RV32IFD-LABEL: main:
17 ; RV32IFD: # %bb.0: # %entry
18 ; RV32IFD-NEXT: addi sp, sp, -16
19 ; RV32IFD-NEXT: sw ra, 12(sp)
20 ; RV32IFD-NEXT: lui a1, 262144
21 ; RV32IFD-NEXT: mv a0, zero
22 ; RV32IFD-NEXT: call test
23 ; RV32IFD-NEXT: sw a0, 0(sp)
24 ; RV32IFD-NEXT: sw a1, 4(sp)
25 ; RV32IFD-NEXT: fld ft0, 0(sp)
26 ; RV32IFD-NEXT: lui a0, %hi(.LCPI1_0)
27 ; RV32IFD-NEXT: addi a0, a0, %lo(.LCPI1_0)
28 ; RV32IFD-NEXT: fld ft1, 0(a0)
29 ; RV32IFD-NEXT: flt.d a0, ft0, ft1
30 ; RV32IFD-NEXT: bnez a0, .LBB1_3
31 ; RV32IFD-NEXT: # %bb.1: # %entry
32 ; RV32IFD-NEXT: lui a0, %hi(.LCPI1_1)
33 ; RV32IFD-NEXT: addi a0, a0, %lo(.LCPI1_1)
34 ; RV32IFD-NEXT: fld ft1, 0(a0)
35 ; RV32IFD-NEXT: flt.d a0, ft1, ft0
36 ; RV32IFD-NEXT: xori a0, a0, 1
37 ; RV32IFD-NEXT: beqz a0, .LBB1_3
38 ; RV32IFD-NEXT: # %bb.2: # %if.end
39 ; RV32IFD-NEXT: mv a0, zero
40 ; RV32IFD-NEXT: call exit
41 ; RV32IFD-NEXT: .LBB1_3: # %if.then
42 ; RV32IFD-NEXT: call abort
44 %call = call double @test(double 2.000000e+00)
45 %cmp = fcmp olt double %call, 2.400000e-01
46 %cmp2 = fcmp ogt double %call, 2.600000e-01
47 %or.cond = or i1 %cmp, %cmp2
48 br i1 %or.cond, label %if.then, label %if.end
55 call void @exit(i32 0)
61 declare void @exit(i32)