Index: llvm/lib/Target/RISCV/RISCVISelLowering.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -352,7 +352,7 @@ static const unsigned FPOpToExpand[] = { ISD::FSIN, ISD::FCOS, ISD::FSINCOS, ISD::FPOW, - ISD::FREM, ISD::FP16_TO_FP, ISD::FP_TO_FP16}; + ISD::FREM}; static const unsigned FPRndMode[] = { ISD::FCEIL, ISD::FFLOOR, ISD::FTRUNC, ISD::FRINT, ISD::FROUND, @@ -427,6 +427,8 @@ setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::f16, Expand); setTruncStoreAction(MVT::f32, MVT::f16, Expand); setOperationAction(ISD::IS_FPCLASS, MVT::f32, Custom); + setOperationAction(ISD::FP_TO_FP16, MVT::f32, Custom); + setOperationAction(ISD::FP16_TO_FP, MVT::f32, Custom); if (Subtarget.hasStdExtZfa()) setOperationAction(ISD::FNEARBYINT, MVT::f32, Legal); @@ -461,6 +463,8 @@ setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f16, Expand); setTruncStoreAction(MVT::f64, MVT::f16, Expand); setOperationAction(ISD::IS_FPCLASS, MVT::f64, Custom); + setOperationAction(ISD::FP_TO_FP16, MVT::f64, Custom); + setOperationAction(ISD::FP16_TO_FP, MVT::f64, Expand); } if (Subtarget.is64Bit()) { @@ -4917,6 +4921,35 @@ case ISD::FP_TO_SINT_SAT: case ISD::FP_TO_UINT_SAT: return lowerFP_TO_INT_SAT(Op, DAG, Subtarget); + case ISD::FP_TO_FP16: { + // Custom lower to ensure the libcall return is passed in an FPR on hard + // float ABIs. + assert(Subtarget.hasStdExtFOrZfinx() && "Unexpected custom legalisation"); + SDLoc DL(Op); + MakeLibCallOptions CallOptions; + RTLIB::Libcall LC = + RTLIB::getFPROUND(Op.getOperand(0).getValueType(), MVT::f16); + SDValue Res = + makeLibCall(DAG, LC, MVT::f32, Op.getOperand(0), CallOptions, DL).first; + if (Subtarget.is64Bit()) + return DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Res); + return DAG.getBitcast(MVT::i32, Res); + } + case ISD::FP16_TO_FP: { + // Custom lower to ensure the libcall argument is passed in an FPR on hard + // float ABIs. + assert(Subtarget.hasStdExtFOrZfinx() && "Unexpected custom legalisation"); + SDLoc DL(Op); + MakeLibCallOptions CallOptions; + SDValue Arg = Subtarget.is64Bit() + ? DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, + Op.getOperand(0)) + : DAG.getBitcast(MVT::f32, Op.getOperand(0)); + SDValue Res = + makeLibCall(DAG, RTLIB::FPEXT_F16_F32, MVT::f32, Arg, CallOptions, DL) + .first; + return Res; + } case ISD::FTRUNC: case ISD::FCEIL: case ISD::FFLOOR: Index: llvm/test/CodeGen/RISCV/calling-conv-half.ll =================================================================== --- llvm/test/CodeGen/RISCV/calling-conv-half.ll +++ llvm/test/CodeGen/RISCV/calling-conv-half.ll @@ -83,7 +83,6 @@ ; RV32-ILP32F-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-ILP32F-NEXT: sw s0, 8(sp) # 4-byte Folded Spill ; RV32-ILP32F-NEXT: mv s0, a0 -; RV32-ILP32F-NEXT: fmv.x.w a0, fa0 ; RV32-ILP32F-NEXT: call __extendhfsf2@plt ; RV32-ILP32F-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-ILP32F-NEXT: add a0, s0, a0 @@ -99,6 +98,7 @@ ; RV64-LP64F-NEXT: sd s0, 0(sp) # 8-byte Folded Spill ; RV64-LP64F-NEXT: mv s0, a0 ; RV64-LP64F-NEXT: fmv.x.w a0, fa0 +; RV64-LP64F-NEXT: fmv.w.x fa0, a0 ; RV64-LP64F-NEXT: call __extendhfsf2@plt ; RV64-LP64F-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-LP64F-NEXT: addw a0, s0, a0 @@ -292,7 +292,6 @@ ; RV32-ILP32F-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-ILP32F-NEXT: sw s0, 8(sp) # 4-byte Folded Spill ; RV32-ILP32F-NEXT: mv s0, a7 -; RV32-ILP32F-NEXT: fmv.x.w a0, fa0 ; RV32-ILP32F-NEXT: call __extendhfsf2@plt ; RV32-ILP32F-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-ILP32F-NEXT: add a0, s0, a0 @@ -308,6 +307,7 @@ ; RV64-LP64F-NEXT: sd s0, 0(sp) # 8-byte Folded Spill ; RV64-LP64F-NEXT: mv s0, a7 ; RV64-LP64F-NEXT: fmv.x.w a0, fa0 +; RV64-LP64F-NEXT: fmv.w.x fa0, a0 ; RV64-LP64F-NEXT: call __extendhfsf2@plt ; RV64-LP64F-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-LP64F-NEXT: addw a0, s0, a0 @@ -602,7 +602,6 @@ ; RV32-ILP32F-NEXT: addi sp, sp, -16 ; RV32-ILP32F-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-ILP32F-NEXT: call callee_half_ret@plt -; RV32-ILP32F-NEXT: fmv.x.w a0, fa0 ; RV32-ILP32F-NEXT: call __extendhfsf2@plt ; RV32-ILP32F-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-ILP32F-NEXT: lw ra, 12(sp) # 4-byte Folded Reload @@ -615,6 +614,7 @@ ; RV64-LP64F-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-LP64F-NEXT: call callee_half_ret@plt ; RV64-LP64F-NEXT: fmv.x.w a0, fa0 +; RV64-LP64F-NEXT: fmv.w.x fa0, a0 ; RV64-LP64F-NEXT: call __extendhfsf2@plt ; RV64-LP64F-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-LP64F-NEXT: ld ra, 8(sp) # 8-byte Folded Reload Index: llvm/test/CodeGen/RISCV/copysign-casts.ll =================================================================== --- llvm/test/CodeGen/RISCV/copysign-casts.ll +++ llvm/test/CodeGen/RISCV/copysign-casts.ll @@ -163,7 +163,7 @@ ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32IFD-NEXT: fsd fs0, 0(sp) # 8-byte Folded Spill ; RV32IFD-NEXT: fmv.d fs0, fa0 -; RV32IFD-NEXT: fmv.x.w a0, fa1 +; RV32IFD-NEXT: fmv.s fa0, fa1 ; RV32IFD-NEXT: call __extendhfsf2@plt ; RV32IFD-NEXT: fcvt.d.s fa5, fa0 ; RV32IFD-NEXT: fsgnj.d fa0, fs0, fa5 @@ -179,6 +179,7 @@ ; RV64IFD-NEXT: fsd fs0, 0(sp) # 8-byte Folded Spill ; RV64IFD-NEXT: fmv.d fs0, fa0 ; RV64IFD-NEXT: fmv.x.w a0, fa1 +; RV64IFD-NEXT: fmv.w.x fa0, a0 ; RV64IFD-NEXT: call __extendhfsf2@plt ; RV64IFD-NEXT: fcvt.d.s fa5, fa0 ; RV64IFD-NEXT: fsgnj.d fa0, fs0, fa5 @@ -264,7 +265,7 @@ ; RV32IF-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32IF-NEXT: fsw fs0, 8(sp) # 4-byte Folded Spill ; RV32IF-NEXT: fmv.s fs0, fa0 -; RV32IF-NEXT: fmv.x.w a0, fa1 +; RV32IF-NEXT: fmv.s fa0, fa1 ; RV32IF-NEXT: call __extendhfsf2@plt ; RV32IF-NEXT: fsgnj.s fa0, fs0, fa0 ; RV32IF-NEXT: lw ra, 12(sp) # 4-byte Folded Reload @@ -278,7 +279,7 @@ ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32IFD-NEXT: fsd fs0, 0(sp) # 8-byte Folded Spill ; RV32IFD-NEXT: fmv.s fs0, fa0 -; RV32IFD-NEXT: fmv.x.w a0, fa1 +; RV32IFD-NEXT: fmv.s fa0, fa1 ; RV32IFD-NEXT: call __extendhfsf2@plt ; RV32IFD-NEXT: fsgnj.s fa0, fs0, fa0 ; RV32IFD-NEXT: lw ra, 12(sp) # 4-byte Folded Reload @@ -293,6 +294,7 @@ ; RV64IFD-NEXT: fsd fs0, 0(sp) # 8-byte Folded Spill ; RV64IFD-NEXT: fmv.s fs0, fa0 ; RV64IFD-NEXT: fmv.x.w a0, fa1 +; RV64IFD-NEXT: fmv.w.x fa0, a0 ; RV64IFD-NEXT: call __extendhfsf2@plt ; RV64IFD-NEXT: fsgnj.s fa0, fs0, fa0 ; RV64IFD-NEXT: ld ra, 8(sp) # 8-byte Folded Reload Index: llvm/test/CodeGen/RISCV/fp16-promote.ll =================================================================== --- llvm/test/CodeGen/RISCV/fp16-promote.ll +++ llvm/test/CodeGen/RISCV/fp16-promote.ll @@ -15,8 +15,14 @@ define float @test_fpextend_float(ptr %p) nounwind { ; CHECK-LABEL: test_fpextend_float: ; CHECK: # %bb.0: +; CHECK-NEXT: addi sp, sp, -16 +; CHECK-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; CHECK-NEXT: lhu a0, 0(a0) -; CHECK-NEXT: tail __extendhfsf2@plt +; CHECK-NEXT: fmv.w.x fa0, a0 +; CHECK-NEXT: call __extendhfsf2@plt +; CHECK-NEXT: lw ra, 12(sp) # 4-byte Folded Reload +; CHECK-NEXT: addi sp, sp, 16 +; CHECK-NEXT: ret %a = load half, ptr %p %r = fpext half %a to float ret float %r @@ -28,6 +34,7 @@ ; CHECK-NEXT: addi sp, sp, -16 ; CHECK-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; CHECK-NEXT: lhu a0, 0(a0) +; CHECK-NEXT: fmv.w.x fa0, a0 ; CHECK-NEXT: call __extendhfsf2@plt ; CHECK-NEXT: fcvt.d.s fa0, fa0 ; CHECK-NEXT: lw ra, 12(sp) # 4-byte Folded Reload @@ -46,6 +53,7 @@ ; CHECK-NEXT: sw s0, 8(sp) # 4-byte Folded Spill ; CHECK-NEXT: mv s0, a0 ; CHECK-NEXT: call __truncsfhf2@plt +; CHECK-NEXT: fmv.x.w a0, fa0 ; CHECK-NEXT: sh a0, 0(s0) ; CHECK-NEXT: lw ra, 12(sp) # 4-byte Folded Reload ; CHECK-NEXT: lw s0, 8(sp) # 4-byte Folded Reload @@ -64,6 +72,7 @@ ; CHECK-NEXT: sw s0, 8(sp) # 4-byte Folded Spill ; CHECK-NEXT: mv s0, a0 ; CHECK-NEXT: call __truncdfhf2@plt +; CHECK-NEXT: fmv.x.w a0, fa0 ; CHECK-NEXT: sh a0, 0(s0) ; CHECK-NEXT: lw ra, 12(sp) # 4-byte Folded Reload ; CHECK-NEXT: lw s0, 8(sp) # 4-byte Folded Reload @@ -80,22 +89,25 @@ ; CHECK-NEXT: addi sp, sp, -32 ; CHECK-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; CHECK-NEXT: sw s0, 24(sp) # 4-byte Folded Spill -; CHECK-NEXT: sw s1, 20(sp) # 4-byte Folded Spill -; CHECK-NEXT: fsd fs0, 8(sp) # 8-byte Folded Spill +; CHECK-NEXT: fsd fs0, 16(sp) # 8-byte Folded Spill +; CHECK-NEXT: fsd fs1, 8(sp) # 8-byte Folded Spill ; CHECK-NEXT: mv s0, a0 -; CHECK-NEXT: lhu s1, 0(a0) -; CHECK-NEXT: lhu a0, 0(a1) +; CHECK-NEXT: lhu a0, 0(a0) +; CHECK-NEXT: lhu a1, 0(a1) +; CHECK-NEXT: fmv.w.x fs0, a0 +; CHECK-NEXT: fmv.w.x fa0, a1 ; CHECK-NEXT: call __extendhfsf2@plt -; CHECK-NEXT: fmv.s fs0, fa0 -; CHECK-NEXT: mv a0, s1 +; CHECK-NEXT: fmv.s fs1, fa0 +; CHECK-NEXT: fmv.s fa0, fs0 ; CHECK-NEXT: call __extendhfsf2@plt -; CHECK-NEXT: fadd.s fa0, fa0, fs0 +; CHECK-NEXT: fadd.s fa0, fa0, fs1 ; CHECK-NEXT: call __truncsfhf2@plt +; CHECK-NEXT: fmv.x.w a0, fa0 ; CHECK-NEXT: sh a0, 0(s0) ; CHECK-NEXT: lw ra, 28(sp) # 4-byte Folded Reload ; CHECK-NEXT: lw s0, 24(sp) # 4-byte Folded Reload -; CHECK-NEXT: lw s1, 20(sp) # 4-byte Folded Reload -; CHECK-NEXT: fld fs0, 8(sp) # 8-byte Folded Reload +; CHECK-NEXT: fld fs0, 16(sp) # 8-byte Folded Reload +; CHECK-NEXT: fld fs1, 8(sp) # 8-byte Folded Reload ; CHECK-NEXT: addi sp, sp, 32 ; CHECK-NEXT: ret %a = load half, ptr %p @@ -111,22 +123,25 @@ ; CHECK-NEXT: addi sp, sp, -32 ; CHECK-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; CHECK-NEXT: sw s0, 24(sp) # 4-byte Folded Spill -; CHECK-NEXT: sw s1, 20(sp) # 4-byte Folded Spill -; CHECK-NEXT: fsd fs0, 8(sp) # 8-byte Folded Spill +; CHECK-NEXT: fsd fs0, 16(sp) # 8-byte Folded Spill +; CHECK-NEXT: fsd fs1, 8(sp) # 8-byte Folded Spill ; CHECK-NEXT: mv s0, a0 -; CHECK-NEXT: lhu s1, 0(a0) -; CHECK-NEXT: lhu a0, 0(a1) +; CHECK-NEXT: lhu a0, 0(a0) +; CHECK-NEXT: lhu a1, 0(a1) +; CHECK-NEXT: fmv.w.x fs0, a0 +; CHECK-NEXT: fmv.w.x fa0, a1 ; CHECK-NEXT: call __extendhfsf2@plt -; CHECK-NEXT: fmv.s fs0, fa0 -; CHECK-NEXT: mv a0, s1 +; CHECK-NEXT: fmv.s fs1, fa0 +; CHECK-NEXT: fmv.s fa0, fs0 ; CHECK-NEXT: call __extendhfsf2@plt -; CHECK-NEXT: fmul.s fa0, fa0, fs0 +; CHECK-NEXT: fmul.s fa0, fa0, fs1 ; CHECK-NEXT: call __truncsfhf2@plt +; CHECK-NEXT: fmv.x.w a0, fa0 ; CHECK-NEXT: sh a0, 0(s0) ; CHECK-NEXT: lw ra, 28(sp) # 4-byte Folded Reload ; CHECK-NEXT: lw s0, 24(sp) # 4-byte Folded Reload -; CHECK-NEXT: lw s1, 20(sp) # 4-byte Folded Reload -; CHECK-NEXT: fld fs0, 8(sp) # 8-byte Folded Reload +; CHECK-NEXT: fld fs0, 16(sp) # 8-byte Folded Reload +; CHECK-NEXT: fld fs1, 8(sp) # 8-byte Folded Reload ; CHECK-NEXT: addi sp, sp, 32 ; CHECK-NEXT: ret %a = load half, ptr %p Index: llvm/test/CodeGen/RISCV/fpclamptosat.ll =================================================================== --- llvm/test/CodeGen/RISCV/fpclamptosat.ll +++ llvm/test/CodeGen/RISCV/fpclamptosat.ll @@ -355,7 +355,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: call __fixsfdi@plt ; RV32-NEXT: lui a2, 524288 @@ -397,6 +396,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: lui a1, 524288 @@ -429,7 +429,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: call __fixunssfdi@plt ; RV32-NEXT: sltiu a2, a0, -1 @@ -448,6 +447,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.lu.s a0, fa0, rtz ; RV64-NEXT: li a1, -1 @@ -474,7 +474,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: call __fixsfdi@plt ; RV32-NEXT: beqz a1, .LBB8_2 @@ -508,6 +507,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: li a1, -1 @@ -891,7 +891,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-NEXT: lui a1, 8 @@ -916,6 +915,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: lui a1, 8 @@ -949,7 +949,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: fcvt.wu.s a0, fa0, rtz ; RV32-NEXT: lui a1, 16 @@ -969,6 +968,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.lu.s a0, fa0, rtz ; RV64-NEXT: lui a1, 16 @@ -995,7 +995,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-NEXT: lui a1, 16 @@ -1018,6 +1017,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: lui a1, 16 @@ -1666,7 +1666,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 32 ; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: addi a0, sp, 8 ; RV32-NEXT: call __fixsfti@plt @@ -1729,6 +1728,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: call __fixsfti@plt ; RV64-NEXT: li a2, -1 @@ -1779,7 +1779,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 32 ; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: addi a0, sp, 8 ; RV32-NEXT: call __fixunssfti@plt @@ -1808,6 +1807,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: call __fixunssfti@plt ; RV64-NEXT: snez a1, a1 @@ -1831,7 +1831,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 32 ; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: addi a0, sp, 8 ; RV32-NEXT: call __fixsfti@plt @@ -1886,6 +1885,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: call __fixsfti@plt ; RV64-NEXT: slti a2, a1, 1 @@ -2256,7 +2256,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: call __fixsfdi@plt ; RV32-NEXT: lui a2, 524288 @@ -2308,6 +2307,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: lui a1, 524288 @@ -2338,7 +2338,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: call __fixunssfdi@plt ; RV32-NEXT: seqz a1, a1 @@ -2355,6 +2354,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.lu.s a0, fa0, rtz ; RV64-NEXT: li a1, -1 @@ -2380,7 +2380,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: call __fixsfdi@plt ; RV32-NEXT: slti a2, a1, 0 @@ -2405,6 +2404,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: li a1, -1 @@ -2776,7 +2776,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-NEXT: lui a1, 8 @@ -2801,6 +2800,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: lui a1, 8 @@ -2832,7 +2832,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: fcvt.wu.s a0, fa0, rtz ; RV32-NEXT: lui a1, 16 @@ -2852,6 +2851,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.lu.s a0, fa0, rtz ; RV64-NEXT: sext.w a0, a0 @@ -2878,7 +2878,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: fcvt.w.s a0, fa0, rtz ; RV32-NEXT: lui a1, 16 @@ -2901,6 +2900,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: fcvt.l.s a0, fa0, rtz ; RV64-NEXT: lui a1, 16 @@ -3606,7 +3606,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 32 ; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: addi a0, sp, 8 ; RV32-NEXT: call __fixsfti@plt @@ -3699,6 +3698,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: call __fixsfti@plt ; RV64-NEXT: li a2, -1 @@ -3756,7 +3756,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 32 ; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: addi a0, sp, 8 ; RV32-NEXT: call __fixunssfti@plt @@ -3786,6 +3785,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: call __fixunssfti@plt ; RV64-NEXT: snez a2, a1 @@ -3812,7 +3812,6 @@ ; RV32-NEXT: .cfi_def_cfa_offset 32 ; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill ; RV32-NEXT: .cfi_offset ra, -4 -; RV32-NEXT: fmv.x.w a0, fa0 ; RV32-NEXT: call __extendhfsf2@plt ; RV32-NEXT: addi a0, sp, 8 ; RV32-NEXT: call __fixsfti@plt @@ -3854,6 +3853,7 @@ ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: fmv.x.w a0, fa0 +; RV64-NEXT: fmv.w.x fa0, a0 ; RV64-NEXT: call __extendhfsf2@plt ; RV64-NEXT: call __fixsfti@plt ; RV64-NEXT: mv a2, a1 Index: llvm/test/CodeGen/RISCV/half-fpext.ll =================================================================== --- llvm/test/CodeGen/RISCV/half-fpext.ll +++ llvm/test/CodeGen/RISCV/half-fpext.ll @@ -11,8 +11,6 @@ ; RV32I-ILP32: # %bb.0: ; RV32I-ILP32-NEXT: addi sp, sp, -16 ; RV32I-ILP32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill -; RV32I-ILP32-NEXT: slli a0, a0, 16 -; RV32I-ILP32-NEXT: srli a0, a0, 16 ; RV32I-ILP32-NEXT: call __extendhfsf2@plt ; RV32I-ILP32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload ; RV32I-ILP32-NEXT: addi sp, sp, 16 @@ -22,8 +20,6 @@ ; RV64I-LP64: # %bb.0: ; RV64I-LP64-NEXT: addi sp, sp, -16 ; RV64I-LP64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill -; RV64I-LP64-NEXT: slli a0, a0, 48 -; RV64I-LP64-NEXT: srli a0, a0, 48 ; RV64I-LP64-NEXT: call __extendhfsf2@plt ; RV64I-LP64-NEXT: ld ra, 8(sp) # 8-byte Folded Reload ; RV64I-LP64-NEXT: addi sp, sp, 16 @@ -31,7 +27,12 @@ ; ; RV32ID-ILP32-LABEL: half_to_float: ; RV32ID-ILP32: # %bb.0: -; RV32ID-ILP32-NEXT: tail __extendhfsf2@plt +; RV32ID-ILP32-NEXT: addi sp, sp, -16 +; RV32ID-ILP32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill +; RV32ID-ILP32-NEXT: call __extendhfsf2@plt +; RV32ID-ILP32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload +; RV32ID-ILP32-NEXT: addi sp, sp, 16 +; RV32ID-ILP32-NEXT: ret ; ; RV64ID-LP64-LABEL: half_to_float: ; RV64ID-LP64: # %bb.0: @@ -44,13 +45,23 @@ ; ; RV32ID-ILP32D-LABEL: half_to_float: ; RV32ID-ILP32D: # %bb.0: -; RV32ID-ILP32D-NEXT: fmv.x.w a0, fa0 -; RV32ID-ILP32D-NEXT: tail __extendhfsf2@plt +; RV32ID-ILP32D-NEXT: addi sp, sp, -16 +; RV32ID-ILP32D-NEXT: sw ra, 12(sp) # 4-byte Folded Spill +; RV32ID-ILP32D-NEXT: call __extendhfsf2@plt +; RV32ID-ILP32D-NEXT: lw ra, 12(sp) # 4-byte Folded Reload +; RV32ID-ILP32D-NEXT: addi sp, sp, 16 +; RV32ID-ILP32D-NEXT: ret ; ; RV64ID-LP64D-LABEL: half_to_float: ; RV64ID-LP64D: # %bb.0: +; RV64ID-LP64D-NEXT: addi sp, sp, -16 +; RV64ID-LP64D-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64ID-LP64D-NEXT: fmv.x.w a0, fa0 -; RV64ID-LP64D-NEXT: tail __extendhfsf2@plt +; RV64ID-LP64D-NEXT: fmv.w.x fa0, a0 +; RV64ID-LP64D-NEXT: call __extendhfsf2@plt +; RV64ID-LP64D-NEXT: ld ra, 8(sp) # 8-byte Folded Reload +; RV64ID-LP64D-NEXT: addi sp, sp, 16 +; RV64ID-LP64D-NEXT: ret %1 = fpext half %a to float ret float %1 } @@ -60,8 +71,6 @@ ; RV32I-ILP32: # %bb.0: ; RV32I-ILP32-NEXT: addi sp, sp, -16 ; RV32I-ILP32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill -; RV32I-ILP32-NEXT: slli a0, a0, 16 -; RV32I-ILP32-NEXT: srli a0, a0, 16 ; RV32I-ILP32-NEXT: call __extendhfsf2@plt ; RV32I-ILP32-NEXT: call __extendsfdf2@plt ; RV32I-ILP32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload @@ -72,11 +81,7 @@ ; RV64I-LP64: # %bb.0: ; RV64I-LP64-NEXT: addi sp, sp, -16 ; RV64I-LP64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill -; RV64I-LP64-NEXT: slli a0, a0, 48 -; RV64I-LP64-NEXT: srli a0, a0, 48 ; RV64I-LP64-NEXT: call __extendhfsf2@plt -; RV64I-LP64-NEXT: slli a0, a0, 32 -; RV64I-LP64-NEXT: srli a0, a0, 32 ; RV64I-LP64-NEXT: call __extendsfdf2@plt ; RV64I-LP64-NEXT: ld ra, 8(sp) # 8-byte Folded Reload ; RV64I-LP64-NEXT: addi sp, sp, 16 @@ -112,7 +117,6 @@ ; RV32ID-ILP32D: # %bb.0: ; RV32ID-ILP32D-NEXT: addi sp, sp, -16 ; RV32ID-ILP32D-NEXT: sw ra, 12(sp) # 4-byte Folded Spill -; RV32ID-ILP32D-NEXT: fmv.x.w a0, fa0 ; RV32ID-ILP32D-NEXT: call __extendhfsf2@plt ; RV32ID-ILP32D-NEXT: fcvt.d.s fa0, fa0 ; RV32ID-ILP32D-NEXT: lw ra, 12(sp) # 4-byte Folded Reload @@ -124,6 +128,7 @@ ; RV64ID-LP64D-NEXT: addi sp, sp, -16 ; RV64ID-LP64D-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64ID-LP64D-NEXT: fmv.x.w a0, fa0 +; RV64ID-LP64D-NEXT: fmv.w.x fa0, a0 ; RV64ID-LP64D-NEXT: call __extendhfsf2@plt ; RV64ID-LP64D-NEXT: fcvt.d.s fa0, fa0 ; RV64ID-LP64D-NEXT: ld ra, 8(sp) # 8-byte Folded Reload Index: llvm/test/CodeGen/RISCV/half-fptrunc.ll =================================================================== --- llvm/test/CodeGen/RISCV/half-fptrunc.ll +++ llvm/test/CodeGen/RISCV/half-fptrunc.ll @@ -52,6 +52,7 @@ ; RV32ID-ILP32D-NEXT: addi sp, sp, -16 ; RV32ID-ILP32D-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32ID-ILP32D-NEXT: call __truncsfhf2@plt +; RV32ID-ILP32D-NEXT: fmv.x.w a0, fa0 ; RV32ID-ILP32D-NEXT: lui a1, 1048560 ; RV32ID-ILP32D-NEXT: or a0, a0, a1 ; RV32ID-ILP32D-NEXT: fmv.w.x fa0, a0 @@ -64,6 +65,7 @@ ; RV64ID-LP64D-NEXT: addi sp, sp, -16 ; RV64ID-LP64D-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64ID-LP64D-NEXT: call __truncsfhf2@plt +; RV64ID-LP64D-NEXT: fmv.x.w a0, fa0 ; RV64ID-LP64D-NEXT: lui a1, 1048560 ; RV64ID-LP64D-NEXT: or a0, a0, a1 ; RV64ID-LP64D-NEXT: fmv.w.x fa0, a0 @@ -120,6 +122,7 @@ ; RV32ID-ILP32D-NEXT: addi sp, sp, -16 ; RV32ID-ILP32D-NEXT: sw ra, 12(sp) # 4-byte Folded Spill ; RV32ID-ILP32D-NEXT: call __truncdfhf2@plt +; RV32ID-ILP32D-NEXT: fmv.x.w a0, fa0 ; RV32ID-ILP32D-NEXT: lui a1, 1048560 ; RV32ID-ILP32D-NEXT: or a0, a0, a1 ; RV32ID-ILP32D-NEXT: fmv.w.x fa0, a0 @@ -132,6 +135,7 @@ ; RV64ID-LP64D-NEXT: addi sp, sp, -16 ; RV64ID-LP64D-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64ID-LP64D-NEXT: call __truncdfhf2@plt +; RV64ID-LP64D-NEXT: fmv.x.w a0, fa0 ; RV64ID-LP64D-NEXT: lui a1, 1048560 ; RV64ID-LP64D-NEXT: or a0, a0, a1 ; RV64ID-LP64D-NEXT: fmv.w.x fa0, a0 Index: llvm/test/CodeGen/RISCV/libcall-tail-calls.ll =================================================================== --- llvm/test/CodeGen/RISCV/libcall-tail-calls.ll +++ llvm/test/CodeGen/RISCV/libcall-tail-calls.ll @@ -120,10 +120,10 @@ ; RV32IFD-ILP32D: # %bb.0: ; RV32IFD-ILP32D-NEXT: addi sp, sp, -16 ; RV32IFD-ILP32D-NEXT: sw ra, 12(sp) # 4-byte Folded Spill -; RV32IFD-ILP32D-NEXT: fmv.x.w a0, fa0 ; RV32IFD-ILP32D-NEXT: call __extendhfsf2@plt ; RV32IFD-ILP32D-NEXT: call sinf@plt ; RV32IFD-ILP32D-NEXT: call __truncsfhf2@plt +; RV32IFD-ILP32D-NEXT: fmv.x.w a0, fa0 ; RV32IFD-ILP32D-NEXT: lui a1, 1048560 ; RV32IFD-ILP32D-NEXT: or a0, a0, a1 ; RV32IFD-ILP32D-NEXT: fmv.w.x fa0, a0 @@ -135,10 +135,10 @@ ; RV32IF-ILP32F: # %bb.0: ; RV32IF-ILP32F-NEXT: addi sp, sp, -16 ; RV32IF-ILP32F-NEXT: sw ra, 12(sp) # 4-byte Folded Spill -; RV32IF-ILP32F-NEXT: fmv.x.w a0, fa0 ; RV32IF-ILP32F-NEXT: call __extendhfsf2@plt ; RV32IF-ILP32F-NEXT: call sinf@plt ; RV32IF-ILP32F-NEXT: call __truncsfhf2@plt +; RV32IF-ILP32F-NEXT: fmv.x.w a0, fa0 ; RV32IF-ILP32F-NEXT: lui a1, 1048560 ; RV32IF-ILP32F-NEXT: or a0, a0, a1 ; RV32IF-ILP32F-NEXT: fmv.w.x fa0, a0 @@ -177,9 +177,11 @@ ; RV64IFD-LP64D-NEXT: addi sp, sp, -16 ; RV64IFD-LP64D-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64IFD-LP64D-NEXT: fmv.x.w a0, fa0 +; RV64IFD-LP64D-NEXT: fmv.w.x fa0, a0 ; RV64IFD-LP64D-NEXT: call __extendhfsf2@plt ; RV64IFD-LP64D-NEXT: call sinf@plt ; RV64IFD-LP64D-NEXT: call __truncsfhf2@plt +; RV64IFD-LP64D-NEXT: fmv.x.w a0, fa0 ; RV64IFD-LP64D-NEXT: lui a1, 1048560 ; RV64IFD-LP64D-NEXT: or a0, a0, a1 ; RV64IFD-LP64D-NEXT: fmv.w.x fa0, a0 @@ -192,9 +194,11 @@ ; RV64IF-LP64F-NEXT: addi sp, sp, -16 ; RV64IF-LP64F-NEXT: sd ra, 8(sp) # 8-byte Folded Spill ; RV64IF-LP64F-NEXT: fmv.x.w a0, fa0 +; RV64IF-LP64F-NEXT: fmv.w.x fa0, a0 ; RV64IF-LP64F-NEXT: call __extendhfsf2@plt ; RV64IF-LP64F-NEXT: call sinf@plt ; RV64IF-LP64F-NEXT: call __truncsfhf2@plt +; RV64IF-LP64F-NEXT: fmv.x.w a0, fa0 ; RV64IF-LP64F-NEXT: lui a1, 1048560 ; RV64IF-LP64F-NEXT: or a0, a0, a1 ; RV64IF-LP64F-NEXT: fmv.w.x fa0, a0 Index: llvm/test/CodeGen/RISCV/rvv/fpclamptosat_vec.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fpclamptosat_vec.ll +++ llvm/test/CodeGen/RISCV/rvv/fpclamptosat_vec.ll @@ -369,17 +369,17 @@ ; CHECK-NOV-NEXT: lhu s3, 8(a1) ; CHECK-NOV-NEXT: lhu a1, 16(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs2, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs2, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a1, 524288 @@ -387,7 +387,7 @@ ; CHECK-NOV-NEXT: bge a0, a4, .LBB6_10 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a2, fs1, rtz -; CHECK-NOV-NEXT: bge s2, a4, .LBB6_11 +; CHECK-NOV-NEXT: bge s1, a4, .LBB6_11 ; CHECK-NOV-NEXT: .LBB6_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: bge a2, a4, .LBB6_12 @@ -398,14 +398,14 @@ ; CHECK-NOV-NEXT: .LBB6_5: # %entry ; CHECK-NOV-NEXT: bge a1, a2, .LBB6_15 ; CHECK-NOV-NEXT: .LBB6_6: # %entry -; CHECK-NOV-NEXT: bge a1, s2, .LBB6_16 +; CHECK-NOV-NEXT: bge a1, s1, .LBB6_16 ; CHECK-NOV-NEXT: .LBB6_7: # %entry ; CHECK-NOV-NEXT: blt a1, a0, .LBB6_9 ; CHECK-NOV-NEXT: .LBB6_8: # %entry ; CHECK-NOV-NEXT: lui a0, 524288 ; CHECK-NOV-NEXT: .LBB6_9: # %entry ; CHECK-NOV-NEXT: sw a0, 12(s0) -; CHECK-NOV-NEXT: sw s2, 8(s0) +; CHECK-NOV-NEXT: sw s1, 8(s0) ; CHECK-NOV-NEXT: sw a2, 4(s0) ; CHECK-NOV-NEXT: sw a3, 0(s0) ; CHECK-NOV-NEXT: ld ra, 56(sp) # 8-byte Folded Reload @@ -421,9 +421,9 @@ ; CHECK-NOV-NEXT: .LBB6_10: # %entry ; CHECK-NOV-NEXT: mv a0, a4 ; CHECK-NOV-NEXT: fcvt.l.s a2, fs1, rtz -; CHECK-NOV-NEXT: blt s2, a4, .LBB6_2 +; CHECK-NOV-NEXT: blt s1, a4, .LBB6_2 ; CHECK-NOV-NEXT: .LBB6_11: # %entry -; CHECK-NOV-NEXT: mv s2, a4 +; CHECK-NOV-NEXT: mv s1, a4 ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: blt a2, a4, .LBB6_3 ; CHECK-NOV-NEXT: .LBB6_12: # %entry @@ -437,9 +437,9 @@ ; CHECK-NOV-NEXT: blt a1, a2, .LBB6_6 ; CHECK-NOV-NEXT: .LBB6_15: # %entry ; CHECK-NOV-NEXT: lui a2, 524288 -; CHECK-NOV-NEXT: blt a1, s2, .LBB6_7 +; CHECK-NOV-NEXT: blt a1, s1, .LBB6_7 ; CHECK-NOV-NEXT: .LBB6_16: # %entry -; CHECK-NOV-NEXT: lui s2, 524288 +; CHECK-NOV-NEXT: lui s1, 524288 ; CHECK-NOV-NEXT: bge a1, a0, .LBB6_8 ; CHECK-NOV-NEXT: j .LBB6_9 ; @@ -463,13 +463,14 @@ ; CHECK-V-NEXT: lhu s1, 16(a0) ; CHECK-V-NEXT: lhu s2, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e64, m2, tu, ma @@ -478,7 +479,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e64, m2, tu, ma @@ -487,7 +488,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma @@ -546,17 +547,17 @@ ; CHECK-NOV-NEXT: lhu s3, 16(a1) ; CHECK-NOV-NEXT: lhu a1, 8(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.lu.s s2, fs2, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.lu.s s1, fs2, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-NOV-NEXT: li a1, -1 @@ -564,7 +565,7 @@ ; CHECK-NOV-NEXT: bgeu a0, a1, .LBB7_6 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a2, fs1, rtz -; CHECK-NOV-NEXT: bgeu s2, a1, .LBB7_7 +; CHECK-NOV-NEXT: bgeu s1, a1, .LBB7_7 ; CHECK-NOV-NEXT: .LBB7_2: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs0, rtz ; CHECK-NOV-NEXT: bgeu a2, a1, .LBB7_8 @@ -575,7 +576,7 @@ ; CHECK-NOV-NEXT: .LBB7_5: # %entry ; CHECK-NOV-NEXT: sw a3, 12(s0) ; CHECK-NOV-NEXT: sw a2, 8(s0) -; CHECK-NOV-NEXT: sw s2, 4(s0) +; CHECK-NOV-NEXT: sw s1, 4(s0) ; CHECK-NOV-NEXT: sw a0, 0(s0) ; CHECK-NOV-NEXT: ld ra, 56(sp) # 8-byte Folded Reload ; CHECK-NOV-NEXT: ld s0, 48(sp) # 8-byte Folded Reload @@ -590,9 +591,9 @@ ; CHECK-NOV-NEXT: .LBB7_6: # %entry ; CHECK-NOV-NEXT: mv a0, a1 ; CHECK-NOV-NEXT: fcvt.lu.s a2, fs1, rtz -; CHECK-NOV-NEXT: bltu s2, a1, .LBB7_2 +; CHECK-NOV-NEXT: bltu s1, a1, .LBB7_2 ; CHECK-NOV-NEXT: .LBB7_7: # %entry -; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: mv s1, a1 ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs0, rtz ; CHECK-NOV-NEXT: bltu a2, a1, .LBB7_3 ; CHECK-NOV-NEXT: .LBB7_8: # %entry @@ -620,13 +621,14 @@ ; CHECK-V-NEXT: lhu s1, 16(a0) ; CHECK-V-NEXT: lhu s2, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e64, m2, tu, ma @@ -635,7 +637,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e64, m2, tu, ma @@ -644,7 +646,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma @@ -700,17 +702,17 @@ ; CHECK-NOV-NEXT: lhu s3, 16(a1) ; CHECK-NOV-NEXT: lhu a1, 8(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs2, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs2, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: li a2, -1 @@ -718,7 +720,7 @@ ; CHECK-NOV-NEXT: bge a0, a2, .LBB8_6 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a1, fs1, rtz -; CHECK-NOV-NEXT: bge s2, a2, .LBB8_7 +; CHECK-NOV-NEXT: bge s1, a2, .LBB8_7 ; CHECK-NOV-NEXT: .LBB8_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: bge a1, a2, .LBB8_8 @@ -729,12 +731,12 @@ ; CHECK-NOV-NEXT: .LBB8_5: # %entry ; CHECK-NOV-NEXT: sgtz a2, a3 ; CHECK-NOV-NEXT: sgtz a4, a1 -; CHECK-NOV-NEXT: sgtz a5, s2 +; CHECK-NOV-NEXT: sgtz a5, s1 ; CHECK-NOV-NEXT: sgtz a6, a0 ; CHECK-NOV-NEXT: negw a6, a6 ; CHECK-NOV-NEXT: and a0, a6, a0 ; CHECK-NOV-NEXT: negw a5, a5 -; CHECK-NOV-NEXT: and a5, a5, s2 +; CHECK-NOV-NEXT: and a5, a5, s1 ; CHECK-NOV-NEXT: negw a4, a4 ; CHECK-NOV-NEXT: and a1, a4, a1 ; CHECK-NOV-NEXT: negw a2, a2 @@ -756,9 +758,9 @@ ; CHECK-NOV-NEXT: .LBB8_6: # %entry ; CHECK-NOV-NEXT: mv a0, a2 ; CHECK-NOV-NEXT: fcvt.l.s a1, fs1, rtz -; CHECK-NOV-NEXT: blt s2, a2, .LBB8_2 +; CHECK-NOV-NEXT: blt s1, a2, .LBB8_2 ; CHECK-NOV-NEXT: .LBB8_7: # %entry -; CHECK-NOV-NEXT: mv s2, a2 +; CHECK-NOV-NEXT: mv s1, a2 ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: blt a1, a2, .LBB8_3 ; CHECK-NOV-NEXT: .LBB8_8: # %entry @@ -786,13 +788,14 @@ ; CHECK-V-NEXT: lhu s1, 16(a0) ; CHECK-V-NEXT: lhu s2, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e64, m2, tu, ma @@ -801,7 +804,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e64, m2, tu, ma @@ -810,7 +813,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma @@ -1231,29 +1234,29 @@ ; CHECK-NOV-NEXT: lhu s7, 40(a1) ; CHECK-NOV-NEXT: lhu a1, 48(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs6, fa0 -; CHECK-NOV-NEXT: mv a0, s7 +; CHECK-NOV-NEXT: fmv.w.x fa0, s7 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs5, fa0 -; CHECK-NOV-NEXT: mv a0, s6 +; CHECK-NOV-NEXT: fmv.w.x fa0, s6 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs4, fa0 -; CHECK-NOV-NEXT: mv a0, s5 +; CHECK-NOV-NEXT: fmv.w.x fa0, s5 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs3, fa0 -; CHECK-NOV-NEXT: mv a0, s4 +; CHECK-NOV-NEXT: fmv.w.x fa0, s4 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs6, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs6, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a7, 8 @@ -1261,7 +1264,7 @@ ; CHECK-NOV-NEXT: bge a0, a7, .LBB15_18 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: bge s2, a7, .LBB15_19 +; CHECK-NOV-NEXT: bge s1, a7, .LBB15_19 ; CHECK-NOV-NEXT: .LBB15_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: bge a1, a7, .LBB15_20 @@ -1293,14 +1296,14 @@ ; CHECK-NOV-NEXT: .LBB15_13: # %entry ; CHECK-NOV-NEXT: bge a7, a1, .LBB15_31 ; CHECK-NOV-NEXT: .LBB15_14: # %entry -; CHECK-NOV-NEXT: bge a7, s2, .LBB15_32 +; CHECK-NOV-NEXT: bge a7, s1, .LBB15_32 ; CHECK-NOV-NEXT: .LBB15_15: # %entry ; CHECK-NOV-NEXT: blt a7, a0, .LBB15_17 ; CHECK-NOV-NEXT: .LBB15_16: # %entry ; CHECK-NOV-NEXT: lui a0, 1048568 ; CHECK-NOV-NEXT: .LBB15_17: # %entry ; CHECK-NOV-NEXT: sh a0, 14(s0) -; CHECK-NOV-NEXT: sh s2, 12(s0) +; CHECK-NOV-NEXT: sh s1, 12(s0) ; CHECK-NOV-NEXT: sh a1, 10(s0) ; CHECK-NOV-NEXT: sh a2, 8(s0) ; CHECK-NOV-NEXT: sh a3, 6(s0) @@ -1328,9 +1331,9 @@ ; CHECK-NOV-NEXT: .LBB15_18: # %entry ; CHECK-NOV-NEXT: mv a0, a7 ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: blt s2, a7, .LBB15_2 +; CHECK-NOV-NEXT: blt s1, a7, .LBB15_2 ; CHECK-NOV-NEXT: .LBB15_19: # %entry -; CHECK-NOV-NEXT: mv s2, a7 +; CHECK-NOV-NEXT: mv s1, a7 ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: blt a1, a7, .LBB15_3 ; CHECK-NOV-NEXT: .LBB15_20: # %entry @@ -1373,9 +1376,9 @@ ; CHECK-NOV-NEXT: blt a7, a1, .LBB15_14 ; CHECK-NOV-NEXT: .LBB15_31: # %entry ; CHECK-NOV-NEXT: lui a1, 1048568 -; CHECK-NOV-NEXT: blt a7, s2, .LBB15_15 +; CHECK-NOV-NEXT: blt a7, s1, .LBB15_15 ; CHECK-NOV-NEXT: .LBB15_32: # %entry -; CHECK-NOV-NEXT: lui s2, 1048568 +; CHECK-NOV-NEXT: lui s1, 1048568 ; CHECK-NOV-NEXT: bge a7, a0, .LBB15_16 ; CHECK-NOV-NEXT: j .LBB15_17 ; @@ -1411,13 +1414,14 @@ ; CHECK-V-NEXT: lhu s5, 16(a0) ; CHECK-V-NEXT: lhu s6, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s6 +; CHECK-V-NEXT: fmv.w.x fa0, s6 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e32, m2, tu, ma @@ -1426,7 +1430,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s5 +; CHECK-V-NEXT: fmv.w.x fa0, s5 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e32, m2, tu, ma @@ -1435,7 +1439,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s4 +; CHECK-V-NEXT: fmv.w.x fa0, s4 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e32, m2, tu, ma @@ -1444,7 +1448,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 3 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s3 +; CHECK-V-NEXT: fmv.w.x fa0, s3 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 5, e32, m2, tu, ma @@ -1453,7 +1457,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 4 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 6, e32, m2, tu, ma @@ -1462,7 +1466,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 5 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 7, e32, m2, tu, ma @@ -1471,7 +1475,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 6 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 8, e32, m2, ta, ma @@ -1555,29 +1559,29 @@ ; CHECK-NOV-NEXT: lhu s7, 16(a1) ; CHECK-NOV-NEXT: lhu a1, 8(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs6, fa0 -; CHECK-NOV-NEXT: mv a0, s7 +; CHECK-NOV-NEXT: fmv.w.x fa0, s7 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs5, fa0 -; CHECK-NOV-NEXT: mv a0, s6 +; CHECK-NOV-NEXT: fmv.w.x fa0, s6 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs4, fa0 -; CHECK-NOV-NEXT: mv a0, s5 +; CHECK-NOV-NEXT: fmv.w.x fa0, s5 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs3, fa0 -; CHECK-NOV-NEXT: mv a0, s4 +; CHECK-NOV-NEXT: fmv.w.x fa0, s4 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.lu.s s2, fs6, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.lu.s s1, fs6, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a1, 16 @@ -1585,7 +1589,7 @@ ; CHECK-NOV-NEXT: bgeu a0, a1, .LBB16_10 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a2, fs5, rtz -; CHECK-NOV-NEXT: bgeu s2, a1, .LBB16_11 +; CHECK-NOV-NEXT: bgeu s1, a1, .LBB16_11 ; CHECK-NOV-NEXT: .LBB16_2: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs4, rtz ; CHECK-NOV-NEXT: bgeu a2, a1, .LBB16_12 @@ -1612,7 +1616,7 @@ ; CHECK-NOV-NEXT: sh a4, 8(s0) ; CHECK-NOV-NEXT: sh a3, 6(s0) ; CHECK-NOV-NEXT: sh a2, 4(s0) -; CHECK-NOV-NEXT: sh s2, 2(s0) +; CHECK-NOV-NEXT: sh s1, 2(s0) ; CHECK-NOV-NEXT: sh a0, 0(s0) ; CHECK-NOV-NEXT: ld ra, 120(sp) # 8-byte Folded Reload ; CHECK-NOV-NEXT: ld s0, 112(sp) # 8-byte Folded Reload @@ -1635,9 +1639,9 @@ ; CHECK-NOV-NEXT: .LBB16_10: # %entry ; CHECK-NOV-NEXT: mv a0, a1 ; CHECK-NOV-NEXT: fcvt.lu.s a2, fs5, rtz -; CHECK-NOV-NEXT: bltu s2, a1, .LBB16_2 +; CHECK-NOV-NEXT: bltu s1, a1, .LBB16_2 ; CHECK-NOV-NEXT: .LBB16_11: # %entry -; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: mv s1, a1 ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs4, rtz ; CHECK-NOV-NEXT: bltu a2, a1, .LBB16_3 ; CHECK-NOV-NEXT: .LBB16_12: # %entry @@ -1693,13 +1697,14 @@ ; CHECK-V-NEXT: lhu s5, 16(a0) ; CHECK-V-NEXT: lhu s6, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s6 +; CHECK-V-NEXT: fmv.w.x fa0, s6 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e32, m2, tu, ma @@ -1708,7 +1713,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s5 +; CHECK-V-NEXT: fmv.w.x fa0, s5 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e32, m2, tu, ma @@ -1717,7 +1722,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s4 +; CHECK-V-NEXT: fmv.w.x fa0, s4 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e32, m2, tu, ma @@ -1726,7 +1731,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 3 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s3 +; CHECK-V-NEXT: fmv.w.x fa0, s3 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 5, e32, m2, tu, ma @@ -1735,7 +1740,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 4 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 6, e32, m2, tu, ma @@ -1744,7 +1749,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 5 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 7, e32, m2, tu, ma @@ -1753,7 +1758,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 6 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 8, e32, m2, ta, ma @@ -1833,29 +1838,29 @@ ; CHECK-NOV-NEXT: lhu s7, 16(a1) ; CHECK-NOV-NEXT: lhu a1, 8(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs6, fa0 -; CHECK-NOV-NEXT: mv a0, s7 +; CHECK-NOV-NEXT: fmv.w.x fa0, s7 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs5, fa0 -; CHECK-NOV-NEXT: mv a0, s6 +; CHECK-NOV-NEXT: fmv.w.x fa0, s6 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs4, fa0 -; CHECK-NOV-NEXT: mv a0, s5 +; CHECK-NOV-NEXT: fmv.w.x fa0, s5 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs3, fa0 -; CHECK-NOV-NEXT: mv a0, s4 +; CHECK-NOV-NEXT: fmv.w.x fa0, s4 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs6, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs6, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a3, 16 @@ -1863,7 +1868,7 @@ ; CHECK-NOV-NEXT: bge a0, a3, .LBB17_10 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: bge s2, a3, .LBB17_11 +; CHECK-NOV-NEXT: bge s1, a3, .LBB17_11 ; CHECK-NOV-NEXT: .LBB17_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: bge a1, a3, .LBB17_12 @@ -1890,12 +1895,12 @@ ; CHECK-NOV-NEXT: sgtz t2, a4 ; CHECK-NOV-NEXT: sgtz t3, a2 ; CHECK-NOV-NEXT: sgtz t4, a1 -; CHECK-NOV-NEXT: sgtz t5, s2 +; CHECK-NOV-NEXT: sgtz t5, s1 ; CHECK-NOV-NEXT: sgtz t6, a0 ; CHECK-NOV-NEXT: negw t6, t6 ; CHECK-NOV-NEXT: and a0, t6, a0 ; CHECK-NOV-NEXT: negw t5, t5 -; CHECK-NOV-NEXT: and t5, t5, s2 +; CHECK-NOV-NEXT: and t5, t5, s1 ; CHECK-NOV-NEXT: negw t4, t4 ; CHECK-NOV-NEXT: and a1, t4, a1 ; CHECK-NOV-NEXT: negw t3, t3 @@ -1937,9 +1942,9 @@ ; CHECK-NOV-NEXT: .LBB17_10: # %entry ; CHECK-NOV-NEXT: mv a0, a3 ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: blt s2, a3, .LBB17_2 +; CHECK-NOV-NEXT: blt s1, a3, .LBB17_2 ; CHECK-NOV-NEXT: .LBB17_11: # %entry -; CHECK-NOV-NEXT: mv s2, a3 +; CHECK-NOV-NEXT: mv s1, a3 ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: blt a1, a3, .LBB17_3 ; CHECK-NOV-NEXT: .LBB17_12: # %entry @@ -1995,13 +2000,14 @@ ; CHECK-V-NEXT: lhu s5, 16(a0) ; CHECK-V-NEXT: lhu s6, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s6 +; CHECK-V-NEXT: fmv.w.x fa0, s6 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e32, m2, tu, ma @@ -2010,7 +2016,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s5 +; CHECK-V-NEXT: fmv.w.x fa0, s5 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e32, m2, tu, ma @@ -2019,7 +2025,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s4 +; CHECK-V-NEXT: fmv.w.x fa0, s4 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e32, m2, tu, ma @@ -2028,7 +2034,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 3 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s3 +; CHECK-V-NEXT: fmv.w.x fa0, s3 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 5, e32, m2, tu, ma @@ -2037,7 +2043,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 4 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 6, e32, m2, tu, ma @@ -2046,7 +2052,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 5 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 7, e32, m2, tu, ma @@ -2055,7 +2061,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 6 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 8, e32, m2, ta, ma @@ -2924,11 +2930,12 @@ ; CHECK-NOV-NEXT: .cfi_offset s1, -24 ; CHECK-NOV-NEXT: .cfi_offset s2, -32 ; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv s0, a0 ; CHECK-NOV-NEXT: mv s1, a1 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv a2, a0 @@ -3005,11 +3012,12 @@ ; CHECK-V-NEXT: .cfi_offset s1, -24 ; CHECK-V-NEXT: .cfi_offset s2, -32 ; CHECK-V-NEXT: mv s2, a1 +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: mv s0, a0 ; CHECK-V-NEXT: mv s1, a1 -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: li a2, -1 @@ -3097,11 +3105,12 @@ ; CHECK-NOV-NEXT: .cfi_offset s1, -24 ; CHECK-NOV-NEXT: .cfi_offset s2, -32 ; CHECK-NOV-NEXT: mv s0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixunssfti@plt ; CHECK-NOV-NEXT: mv s1, a0 ; CHECK-NOV-NEXT: mv s2, a1 -; CHECK-NOV-NEXT: mv a0, s0 +; CHECK-NOV-NEXT: fmv.w.x fa0, s0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixunssfti@plt ; CHECK-NOV-NEXT: snez a1, a1 @@ -3131,11 +3140,12 @@ ; CHECK-V-NEXT: .cfi_offset s1, -24 ; CHECK-V-NEXT: .cfi_offset s2, -32 ; CHECK-V-NEXT: mv s0, a1 +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixunssfti@plt ; CHECK-V-NEXT: mv s1, a0 ; CHECK-V-NEXT: mv s2, a1 -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixunssfti@plt ; CHECK-V-NEXT: snez a1, a1 @@ -3176,11 +3186,12 @@ ; CHECK-NOV-NEXT: .cfi_offset s1, -24 ; CHECK-NOV-NEXT: .cfi_offset s2, -32 ; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv s0, a0 ; CHECK-NOV-NEXT: mv s1, a1 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv a2, s1 @@ -3236,11 +3247,12 @@ ; CHECK-V-NEXT: .cfi_offset s1, -24 ; CHECK-V-NEXT: .cfi_offset s2, -32 ; CHECK-V-NEXT: mv s2, a1 +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: mv s0, a0 ; CHECK-V-NEXT: mv s1, a1 -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: mv a2, s1 @@ -3653,17 +3665,17 @@ ; CHECK-NOV-NEXT: lhu s3, 8(a1) ; CHECK-NOV-NEXT: lhu a1, 16(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs2, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs2, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a1, 524288 @@ -3671,7 +3683,7 @@ ; CHECK-NOV-NEXT: bge a0, a4, .LBB33_10 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a2, fs1, rtz -; CHECK-NOV-NEXT: bge s2, a4, .LBB33_11 +; CHECK-NOV-NEXT: bge s1, a4, .LBB33_11 ; CHECK-NOV-NEXT: .LBB33_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: bge a2, a4, .LBB33_12 @@ -3682,14 +3694,14 @@ ; CHECK-NOV-NEXT: .LBB33_5: # %entry ; CHECK-NOV-NEXT: bge a1, a2, .LBB33_15 ; CHECK-NOV-NEXT: .LBB33_6: # %entry -; CHECK-NOV-NEXT: bge a1, s2, .LBB33_16 +; CHECK-NOV-NEXT: bge a1, s1, .LBB33_16 ; CHECK-NOV-NEXT: .LBB33_7: # %entry ; CHECK-NOV-NEXT: blt a1, a0, .LBB33_9 ; CHECK-NOV-NEXT: .LBB33_8: # %entry ; CHECK-NOV-NEXT: lui a0, 524288 ; CHECK-NOV-NEXT: .LBB33_9: # %entry ; CHECK-NOV-NEXT: sw a0, 12(s0) -; CHECK-NOV-NEXT: sw s2, 8(s0) +; CHECK-NOV-NEXT: sw s1, 8(s0) ; CHECK-NOV-NEXT: sw a2, 4(s0) ; CHECK-NOV-NEXT: sw a3, 0(s0) ; CHECK-NOV-NEXT: ld ra, 56(sp) # 8-byte Folded Reload @@ -3705,9 +3717,9 @@ ; CHECK-NOV-NEXT: .LBB33_10: # %entry ; CHECK-NOV-NEXT: mv a0, a4 ; CHECK-NOV-NEXT: fcvt.l.s a2, fs1, rtz -; CHECK-NOV-NEXT: blt s2, a4, .LBB33_2 +; CHECK-NOV-NEXT: blt s1, a4, .LBB33_2 ; CHECK-NOV-NEXT: .LBB33_11: # %entry -; CHECK-NOV-NEXT: mv s2, a4 +; CHECK-NOV-NEXT: mv s1, a4 ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: blt a2, a4, .LBB33_3 ; CHECK-NOV-NEXT: .LBB33_12: # %entry @@ -3721,9 +3733,9 @@ ; CHECK-NOV-NEXT: blt a1, a2, .LBB33_6 ; CHECK-NOV-NEXT: .LBB33_15: # %entry ; CHECK-NOV-NEXT: lui a2, 524288 -; CHECK-NOV-NEXT: blt a1, s2, .LBB33_7 +; CHECK-NOV-NEXT: blt a1, s1, .LBB33_7 ; CHECK-NOV-NEXT: .LBB33_16: # %entry -; CHECK-NOV-NEXT: lui s2, 524288 +; CHECK-NOV-NEXT: lui s1, 524288 ; CHECK-NOV-NEXT: bge a1, a0, .LBB33_8 ; CHECK-NOV-NEXT: j .LBB33_9 ; @@ -3747,13 +3759,14 @@ ; CHECK-V-NEXT: lhu s1, 16(a0) ; CHECK-V-NEXT: lhu s2, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e64, m2, tu, ma @@ -3762,7 +3775,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e64, m2, tu, ma @@ -3771,7 +3784,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma @@ -3828,17 +3841,17 @@ ; CHECK-NOV-NEXT: lhu s3, 16(a1) ; CHECK-NOV-NEXT: lhu a1, 8(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.lu.s s2, fs2, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.lu.s s1, fs2, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-NOV-NEXT: li a1, -1 @@ -3846,7 +3859,7 @@ ; CHECK-NOV-NEXT: bgeu a0, a1, .LBB34_6 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a2, fs1, rtz -; CHECK-NOV-NEXT: bgeu s2, a1, .LBB34_7 +; CHECK-NOV-NEXT: bgeu s1, a1, .LBB34_7 ; CHECK-NOV-NEXT: .LBB34_2: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs0, rtz ; CHECK-NOV-NEXT: bgeu a2, a1, .LBB34_8 @@ -3857,7 +3870,7 @@ ; CHECK-NOV-NEXT: .LBB34_5: # %entry ; CHECK-NOV-NEXT: sw a3, 12(s0) ; CHECK-NOV-NEXT: sw a2, 8(s0) -; CHECK-NOV-NEXT: sw s2, 4(s0) +; CHECK-NOV-NEXT: sw s1, 4(s0) ; CHECK-NOV-NEXT: sw a0, 0(s0) ; CHECK-NOV-NEXT: ld ra, 56(sp) # 8-byte Folded Reload ; CHECK-NOV-NEXT: ld s0, 48(sp) # 8-byte Folded Reload @@ -3872,9 +3885,9 @@ ; CHECK-NOV-NEXT: .LBB34_6: # %entry ; CHECK-NOV-NEXT: mv a0, a1 ; CHECK-NOV-NEXT: fcvt.lu.s a2, fs1, rtz -; CHECK-NOV-NEXT: bltu s2, a1, .LBB34_2 +; CHECK-NOV-NEXT: bltu s1, a1, .LBB34_2 ; CHECK-NOV-NEXT: .LBB34_7: # %entry -; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: mv s1, a1 ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs0, rtz ; CHECK-NOV-NEXT: bltu a2, a1, .LBB34_3 ; CHECK-NOV-NEXT: .LBB34_8: # %entry @@ -3902,13 +3915,14 @@ ; CHECK-V-NEXT: lhu s1, 16(a0) ; CHECK-V-NEXT: lhu s2, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e64, m2, tu, ma @@ -3917,7 +3931,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e64, m2, tu, ma @@ -3926,7 +3940,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma @@ -3981,17 +3995,17 @@ ; CHECK-NOV-NEXT: lhu s3, 8(a1) ; CHECK-NOV-NEXT: lhu a1, 16(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs2, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs2, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: li a2, -1 @@ -3999,7 +4013,7 @@ ; CHECK-NOV-NEXT: bge a0, a2, .LBB35_6 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a1, fs1, rtz -; CHECK-NOV-NEXT: bge s2, a2, .LBB35_7 +; CHECK-NOV-NEXT: bge s1, a2, .LBB35_7 ; CHECK-NOV-NEXT: .LBB35_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: bge a1, a2, .LBB35_8 @@ -4014,9 +4028,9 @@ ; CHECK-NOV-NEXT: sgtz a3, a1 ; CHECK-NOV-NEXT: negw a3, a3 ; CHECK-NOV-NEXT: and a1, a3, a1 -; CHECK-NOV-NEXT: sgtz a3, s2 +; CHECK-NOV-NEXT: sgtz a3, s1 ; CHECK-NOV-NEXT: negw a3, a3 -; CHECK-NOV-NEXT: and a3, a3, s2 +; CHECK-NOV-NEXT: and a3, a3, s1 ; CHECK-NOV-NEXT: sgtz a4, a0 ; CHECK-NOV-NEXT: negw a4, a4 ; CHECK-NOV-NEXT: and a0, a4, a0 @@ -4037,9 +4051,9 @@ ; CHECK-NOV-NEXT: .LBB35_6: # %entry ; CHECK-NOV-NEXT: mv a0, a2 ; CHECK-NOV-NEXT: fcvt.l.s a1, fs1, rtz -; CHECK-NOV-NEXT: blt s2, a2, .LBB35_2 +; CHECK-NOV-NEXT: blt s1, a2, .LBB35_2 ; CHECK-NOV-NEXT: .LBB35_7: # %entry -; CHECK-NOV-NEXT: mv s2, a2 +; CHECK-NOV-NEXT: mv s1, a2 ; CHECK-NOV-NEXT: fcvt.l.s a3, fs0, rtz ; CHECK-NOV-NEXT: blt a1, a2, .LBB35_3 ; CHECK-NOV-NEXT: .LBB35_8: # %entry @@ -4067,13 +4081,14 @@ ; CHECK-V-NEXT: lhu s1, 16(a0) ; CHECK-V-NEXT: lhu s2, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e64, m2, tu, ma @@ -4082,7 +4097,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e64, m2, tu, ma @@ -4091,7 +4106,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma @@ -4500,29 +4515,29 @@ ; CHECK-NOV-NEXT: lhu s7, 40(a1) ; CHECK-NOV-NEXT: lhu a1, 48(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs6, fa0 -; CHECK-NOV-NEXT: mv a0, s7 +; CHECK-NOV-NEXT: fmv.w.x fa0, s7 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs5, fa0 -; CHECK-NOV-NEXT: mv a0, s6 +; CHECK-NOV-NEXT: fmv.w.x fa0, s6 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs4, fa0 -; CHECK-NOV-NEXT: mv a0, s5 +; CHECK-NOV-NEXT: fmv.w.x fa0, s5 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs3, fa0 -; CHECK-NOV-NEXT: mv a0, s4 +; CHECK-NOV-NEXT: fmv.w.x fa0, s4 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs6, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs6, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a7, 8 @@ -4530,7 +4545,7 @@ ; CHECK-NOV-NEXT: bge a0, a7, .LBB42_18 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: bge s2, a7, .LBB42_19 +; CHECK-NOV-NEXT: bge s1, a7, .LBB42_19 ; CHECK-NOV-NEXT: .LBB42_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: bge a1, a7, .LBB42_20 @@ -4562,14 +4577,14 @@ ; CHECK-NOV-NEXT: .LBB42_13: # %entry ; CHECK-NOV-NEXT: bge a7, a1, .LBB42_31 ; CHECK-NOV-NEXT: .LBB42_14: # %entry -; CHECK-NOV-NEXT: bge a7, s2, .LBB42_32 +; CHECK-NOV-NEXT: bge a7, s1, .LBB42_32 ; CHECK-NOV-NEXT: .LBB42_15: # %entry ; CHECK-NOV-NEXT: blt a7, a0, .LBB42_17 ; CHECK-NOV-NEXT: .LBB42_16: # %entry ; CHECK-NOV-NEXT: lui a0, 1048568 ; CHECK-NOV-NEXT: .LBB42_17: # %entry ; CHECK-NOV-NEXT: sh a0, 14(s0) -; CHECK-NOV-NEXT: sh s2, 12(s0) +; CHECK-NOV-NEXT: sh s1, 12(s0) ; CHECK-NOV-NEXT: sh a1, 10(s0) ; CHECK-NOV-NEXT: sh a2, 8(s0) ; CHECK-NOV-NEXT: sh a3, 6(s0) @@ -4597,9 +4612,9 @@ ; CHECK-NOV-NEXT: .LBB42_18: # %entry ; CHECK-NOV-NEXT: mv a0, a7 ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: blt s2, a7, .LBB42_2 +; CHECK-NOV-NEXT: blt s1, a7, .LBB42_2 ; CHECK-NOV-NEXT: .LBB42_19: # %entry -; CHECK-NOV-NEXT: mv s2, a7 +; CHECK-NOV-NEXT: mv s1, a7 ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: blt a1, a7, .LBB42_3 ; CHECK-NOV-NEXT: .LBB42_20: # %entry @@ -4642,9 +4657,9 @@ ; CHECK-NOV-NEXT: blt a7, a1, .LBB42_14 ; CHECK-NOV-NEXT: .LBB42_31: # %entry ; CHECK-NOV-NEXT: lui a1, 1048568 -; CHECK-NOV-NEXT: blt a7, s2, .LBB42_15 +; CHECK-NOV-NEXT: blt a7, s1, .LBB42_15 ; CHECK-NOV-NEXT: .LBB42_32: # %entry -; CHECK-NOV-NEXT: lui s2, 1048568 +; CHECK-NOV-NEXT: lui s1, 1048568 ; CHECK-NOV-NEXT: bge a7, a0, .LBB42_16 ; CHECK-NOV-NEXT: j .LBB42_17 ; @@ -4680,13 +4695,14 @@ ; CHECK-V-NEXT: lhu s5, 16(a0) ; CHECK-V-NEXT: lhu s6, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s6 +; CHECK-V-NEXT: fmv.w.x fa0, s6 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e32, m2, tu, ma @@ -4695,7 +4711,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s5 +; CHECK-V-NEXT: fmv.w.x fa0, s5 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e32, m2, tu, ma @@ -4704,7 +4720,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s4 +; CHECK-V-NEXT: fmv.w.x fa0, s4 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e32, m2, tu, ma @@ -4713,7 +4729,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 3 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s3 +; CHECK-V-NEXT: fmv.w.x fa0, s3 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 5, e32, m2, tu, ma @@ -4722,7 +4738,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 4 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 6, e32, m2, tu, ma @@ -4731,7 +4747,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 5 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 7, e32, m2, tu, ma @@ -4740,7 +4756,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 6 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 8, e32, m2, ta, ma @@ -4822,31 +4838,31 @@ ; CHECK-NOV-NEXT: lhu s7, 16(a1) ; CHECK-NOV-NEXT: lhu a1, 8(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs5, fa0 -; CHECK-NOV-NEXT: mv a0, s7 +; CHECK-NOV-NEXT: fmv.w.x fa0, s7 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs6, fa0 -; CHECK-NOV-NEXT: mv a0, s6 +; CHECK-NOV-NEXT: fmv.w.x fa0, s6 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs4, fa0 -; CHECK-NOV-NEXT: mv a0, s5 +; CHECK-NOV-NEXT: fmv.w.x fa0, s5 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs3, fa0 -; CHECK-NOV-NEXT: mv a0, s4 +; CHECK-NOV-NEXT: fmv.w.x fa0, s4 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.lu.s s3, fs6, rtz -; CHECK-NOV-NEXT: fcvt.lu.s s2, fs5, rtz -; CHECK-NOV-NEXT: sext.w s2, s2 -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fcvt.lu.s s2, fs6, rtz +; CHECK-NOV-NEXT: fcvt.lu.s a0, fs5, rtz +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: sext.w s1, a0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-NOV-NEXT: sext.w a0, a0 @@ -4857,10 +4873,10 @@ ; CHECK-NOV-NEXT: mv a0, a1 ; CHECK-NOV-NEXT: .LBB43_2: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a3, fs4, rtz -; CHECK-NOV-NEXT: sext.w a2, s3 -; CHECK-NOV-NEXT: bltu s2, a1, .LBB43_4 +; CHECK-NOV-NEXT: sext.w a2, s2 +; CHECK-NOV-NEXT: bltu s1, a1, .LBB43_4 ; CHECK-NOV-NEXT: # %bb.3: # %entry -; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: mv s1, a1 ; CHECK-NOV-NEXT: .LBB43_4: # %entry ; CHECK-NOV-NEXT: fcvt.lu.s a4, fs3, rtz ; CHECK-NOV-NEXT: sext.w a3, a3 @@ -4897,7 +4913,7 @@ ; CHECK-NOV-NEXT: sh a4, 8(s0) ; CHECK-NOV-NEXT: sh a3, 6(s0) ; CHECK-NOV-NEXT: sh a2, 4(s0) -; CHECK-NOV-NEXT: sh s2, 2(s0) +; CHECK-NOV-NEXT: sh s1, 2(s0) ; CHECK-NOV-NEXT: sh a0, 0(s0) ; CHECK-NOV-NEXT: ld ra, 120(sp) # 8-byte Folded Reload ; CHECK-NOV-NEXT: ld s0, 112(sp) # 8-byte Folded Reload @@ -4958,13 +4974,14 @@ ; CHECK-V-NEXT: lhu s5, 16(a0) ; CHECK-V-NEXT: lhu s6, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s6 +; CHECK-V-NEXT: fmv.w.x fa0, s6 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e32, m2, tu, ma @@ -4973,7 +4990,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s5 +; CHECK-V-NEXT: fmv.w.x fa0, s5 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e32, m2, tu, ma @@ -4982,7 +4999,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s4 +; CHECK-V-NEXT: fmv.w.x fa0, s4 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e32, m2, tu, ma @@ -4991,7 +5008,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 3 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s3 +; CHECK-V-NEXT: fmv.w.x fa0, s3 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 5, e32, m2, tu, ma @@ -5000,7 +5017,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 4 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 6, e32, m2, tu, ma @@ -5009,7 +5026,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 5 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 7, e32, m2, tu, ma @@ -5018,7 +5035,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 6 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.lu.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 8, e32, m2, ta, ma @@ -5097,29 +5114,29 @@ ; CHECK-NOV-NEXT: lhu s7, 40(a1) ; CHECK-NOV-NEXT: lhu a1, 48(a1) ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs6, fa0 -; CHECK-NOV-NEXT: mv a0, s7 +; CHECK-NOV-NEXT: fmv.w.x fa0, s7 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs5, fa0 -; CHECK-NOV-NEXT: mv a0, s6 +; CHECK-NOV-NEXT: fmv.w.x fa0, s6 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs4, fa0 -; CHECK-NOV-NEXT: mv a0, s5 +; CHECK-NOV-NEXT: fmv.w.x fa0, s5 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs3, fa0 -; CHECK-NOV-NEXT: mv a0, s4 +; CHECK-NOV-NEXT: fmv.w.x fa0, s4 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs2, fa0 -; CHECK-NOV-NEXT: mv a0, s3 +; CHECK-NOV-NEXT: fmv.w.x fa0, s3 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs1, fa0 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fmv.s fs0, fa0 -; CHECK-NOV-NEXT: fcvt.l.s s2, fs6, rtz -; CHECK-NOV-NEXT: mv a0, s1 +; CHECK-NOV-NEXT: fmv.w.x fa0, s1 +; CHECK-NOV-NEXT: fcvt.l.s s1, fs6, rtz ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-NOV-NEXT: lui a3, 16 @@ -5127,7 +5144,7 @@ ; CHECK-NOV-NEXT: bge a0, a3, .LBB44_10 ; CHECK-NOV-NEXT: # %bb.1: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: bge s2, a3, .LBB44_11 +; CHECK-NOV-NEXT: bge s1, a3, .LBB44_11 ; CHECK-NOV-NEXT: .LBB44_2: # %entry ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: bge a1, a3, .LBB44_12 @@ -5166,9 +5183,9 @@ ; CHECK-NOV-NEXT: sgtz a7, a1 ; CHECK-NOV-NEXT: negw a7, a7 ; CHECK-NOV-NEXT: and a1, a7, a1 -; CHECK-NOV-NEXT: sgtz a7, s2 +; CHECK-NOV-NEXT: sgtz a7, s1 ; CHECK-NOV-NEXT: negw a7, a7 -; CHECK-NOV-NEXT: and a7, a7, s2 +; CHECK-NOV-NEXT: and a7, a7, s1 ; CHECK-NOV-NEXT: sgtz t0, a0 ; CHECK-NOV-NEXT: negw t0, t0 ; CHECK-NOV-NEXT: and a0, t0, a0 @@ -5201,9 +5218,9 @@ ; CHECK-NOV-NEXT: .LBB44_10: # %entry ; CHECK-NOV-NEXT: mv a0, a3 ; CHECK-NOV-NEXT: fcvt.l.s a1, fs5, rtz -; CHECK-NOV-NEXT: blt s2, a3, .LBB44_2 +; CHECK-NOV-NEXT: blt s1, a3, .LBB44_2 ; CHECK-NOV-NEXT: .LBB44_11: # %entry -; CHECK-NOV-NEXT: mv s2, a3 +; CHECK-NOV-NEXT: mv s1, a3 ; CHECK-NOV-NEXT: fcvt.l.s a2, fs4, rtz ; CHECK-NOV-NEXT: blt a1, a3, .LBB44_3 ; CHECK-NOV-NEXT: .LBB44_12: # %entry @@ -5259,13 +5276,14 @@ ; CHECK-V-NEXT: lhu s5, 16(a0) ; CHECK-V-NEXT: lhu s6, 0(a0) ; CHECK-V-NEXT: lhu a0, 8(a0) +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma ; CHECK-V-NEXT: vmv.s.x v8, a0 ; CHECK-V-NEXT: addi a0, sp, 16 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s6 +; CHECK-V-NEXT: fmv.w.x fa0, s6 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 2, e32, m2, tu, ma @@ -5274,7 +5292,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v8, v10, 1 ; CHECK-V-NEXT: vs2r.v v8, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s5 +; CHECK-V-NEXT: fmv.w.x fa0, s5 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 3, e32, m2, tu, ma @@ -5283,7 +5301,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 2 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s4 +; CHECK-V-NEXT: fmv.w.x fa0, s4 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 4, e32, m2, tu, ma @@ -5292,7 +5310,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 3 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s3 +; CHECK-V-NEXT: fmv.w.x fa0, s3 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 5, e32, m2, tu, ma @@ -5301,7 +5319,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 4 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 6, e32, m2, tu, ma @@ -5310,7 +5328,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 5 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s1 +; CHECK-V-NEXT: fmv.w.x fa0, s1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 7, e32, m2, tu, ma @@ -5319,7 +5337,7 @@ ; CHECK-V-NEXT: vl2r.v v10, (a0) # Unknown-size Folded Reload ; CHECK-V-NEXT: vslideup.vi v10, v8, 6 ; CHECK-V-NEXT: vs2r.v v10, (a0) # Unknown-size Folded Spill -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: fcvt.l.s a0, fa0, rtz ; CHECK-V-NEXT: vsetivli zero, 8, e32, m2, ta, ma @@ -6288,11 +6306,12 @@ ; CHECK-NOV-NEXT: .cfi_offset s1, -24 ; CHECK-NOV-NEXT: .cfi_offset s2, -32 ; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv s0, a0 ; CHECK-NOV-NEXT: mv s1, a1 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv a2, a0 @@ -6393,11 +6412,12 @@ ; CHECK-V-NEXT: .cfi_offset s1, -24 ; CHECK-V-NEXT: .cfi_offset s2, -32 ; CHECK-V-NEXT: mv s2, a1 +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: mv s0, a0 ; CHECK-V-NEXT: mv s1, a1 -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: li a2, -1 @@ -6507,12 +6527,12 @@ ; CHECK-NOV-NEXT: .cfi_offset s1, -24 ; CHECK-NOV-NEXT: .cfi_offset s2, -32 ; CHECK-NOV-NEXT: mv s0, a0 -; CHECK-NOV-NEXT: mv a0, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a1 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixunssfti@plt ; CHECK-NOV-NEXT: mv s1, a0 ; CHECK-NOV-NEXT: mv s2, a1 -; CHECK-NOV-NEXT: mv a0, s0 +; CHECK-NOV-NEXT: fmv.w.x fa0, s0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixunssfti@plt ; CHECK-NOV-NEXT: snez a2, a1 @@ -6549,12 +6569,12 @@ ; CHECK-V-NEXT: .cfi_offset s1, -24 ; CHECK-V-NEXT: .cfi_offset s2, -32 ; CHECK-V-NEXT: mv s0, a0 -; CHECK-V-NEXT: mv a0, a1 +; CHECK-V-NEXT: fmv.w.x fa0, a1 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixunssfti@plt ; CHECK-V-NEXT: mv s1, a0 ; CHECK-V-NEXT: mv s2, a1 -; CHECK-V-NEXT: mv a0, s0 +; CHECK-V-NEXT: fmv.w.x fa0, s0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixunssfti@plt ; CHECK-V-NEXT: snez a2, a1 @@ -6602,11 +6622,12 @@ ; CHECK-NOV-NEXT: .cfi_offset s1, -24 ; CHECK-NOV-NEXT: .cfi_offset s2, -32 ; CHECK-NOV-NEXT: mv s2, a1 +; CHECK-NOV-NEXT: fmv.w.x fa0, a0 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv s0, a0 ; CHECK-NOV-NEXT: mv s1, a1 -; CHECK-NOV-NEXT: mv a0, s2 +; CHECK-NOV-NEXT: fmv.w.x fa0, s2 ; CHECK-NOV-NEXT: call __extendhfsf2@plt ; CHECK-NOV-NEXT: call __fixsfti@plt ; CHECK-NOV-NEXT: mv a2, a1 @@ -6659,11 +6680,12 @@ ; CHECK-V-NEXT: .cfi_offset s1, -24 ; CHECK-V-NEXT: .cfi_offset s2, -32 ; CHECK-V-NEXT: mv s2, a1 +; CHECK-V-NEXT: fmv.w.x fa0, a0 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: mv s0, a0 ; CHECK-V-NEXT: mv s1, a1 -; CHECK-V-NEXT: mv a0, s2 +; CHECK-V-NEXT: fmv.w.x fa0, s2 ; CHECK-V-NEXT: call __extendhfsf2@plt ; CHECK-V-NEXT: call __fixsfti@plt ; CHECK-V-NEXT: mv a2, a1