brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 5b9617c Raw
55 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \3; RUN:   | FileCheck -check-prefix=RV64I %s4; RUN: llc -mtriple=riscv64 -mattr=+f -target-abi lp64f -verify-machineinstrs < %s \5; RUN:   | FileCheck -check-prefix=RV64IF %s6 7; The test cases check that we use the si versions of the conversions from8; double.9 10define i32 @strict_fp64_to_ui32(double %a) nounwind strictfp {11; RV64I-LABEL: strict_fp64_to_ui32:12; RV64I:       # %bb.0: # %entry13; RV64I-NEXT:    addi sp, sp, -1614; RV64I-NEXT:    sd ra, 8(sp) # 8-byte Folded Spill15; RV64I-NEXT:    call __fixunsdfsi16; RV64I-NEXT:    ld ra, 8(sp) # 8-byte Folded Reload17; RV64I-NEXT:    addi sp, sp, 1618; RV64I-NEXT:    ret19;20; RV64IF-LABEL: strict_fp64_to_ui32:21; RV64IF:       # %bb.0: # %entry22; RV64IF-NEXT:    addi sp, sp, -1623; RV64IF-NEXT:    sd ra, 8(sp) # 8-byte Folded Spill24; RV64IF-NEXT:    call __fixunsdfsi25; RV64IF-NEXT:    ld ra, 8(sp) # 8-byte Folded Reload26; RV64IF-NEXT:    addi sp, sp, 1627; RV64IF-NEXT:    ret28entry:29  %conv = tail call i32 @llvm.experimental.constrained.fptoui.i32.f64(double %a, metadata !"fpexcept.strict")30  ret i32 %conv31}32 33define i32 @strict_fp64_to_si32(double %a) nounwind strictfp {34; RV64I-LABEL: strict_fp64_to_si32:35; RV64I:       # %bb.0: # %entry36; RV64I-NEXT:    addi sp, sp, -1637; RV64I-NEXT:    sd ra, 8(sp) # 8-byte Folded Spill38; RV64I-NEXT:    call __fixdfsi39; RV64I-NEXT:    ld ra, 8(sp) # 8-byte Folded Reload40; RV64I-NEXT:    addi sp, sp, 1641; RV64I-NEXT:    ret42;43; RV64IF-LABEL: strict_fp64_to_si32:44; RV64IF:       # %bb.0: # %entry45; RV64IF-NEXT:    addi sp, sp, -1646; RV64IF-NEXT:    sd ra, 8(sp) # 8-byte Folded Spill47; RV64IF-NEXT:    call __fixdfsi48; RV64IF-NEXT:    ld ra, 8(sp) # 8-byte Folded Reload49; RV64IF-NEXT:    addi sp, sp, 1650; RV64IF-NEXT:    ret51entry:52  %conv = tail call i32 @llvm.experimental.constrained.fptosi.i32.f64(double %a, metadata !"fpexcept.strict")53  ret i32 %conv54}55