35 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 5; The test cases check that we use the si versions of the conversions from6; double.7 8define i32 @strict_fp32_to_ui32(float %a) nounwind strictfp {9; RV64I-LABEL: strict_fp32_to_ui32:10; RV64I: # %bb.0: # %entry11; RV64I-NEXT: addi sp, sp, -1612; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill13; RV64I-NEXT: call __fixunssfsi14; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload15; RV64I-NEXT: addi sp, sp, 1616; RV64I-NEXT: ret17entry:18 %conv = tail call i32 @llvm.experimental.constrained.fptoui.i32.f32(float %a, metadata !"fpexcept.strict")19 ret i32 %conv20}21 22define i32 @strict_fp32_to_si32(float %a) nounwind strictfp {23; RV64I-LABEL: strict_fp32_to_si32:24; RV64I: # %bb.0: # %entry25; RV64I-NEXT: addi sp, sp, -1626; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill27; RV64I-NEXT: call __fixsfsi28; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload29; RV64I-NEXT: addi sp, sp, 1630; RV64I-NEXT: ret31entry:32 %conv = tail call i32 @llvm.experimental.constrained.fptosi.i32.f32(float %a, metadata !"fpexcept.strict")33 ret i32 %conv34}35