Index: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -2956,7 +2956,10 @@ } bool RISCVDAGToDAGISel::selectVSplat(SDValue N, SDValue &SplatVal) { - if (N.getOpcode() != RISCVISD::VMV_V_X_VL || !N.getOperand(0).isUndef()) + if (N.getOpcode() != RISCVISD::VMV_V_X_VL && + N.getOpcode() != RISCVISD::VMV_S_X_VL) + return false; + if (!N.getOperand(0).isUndef()) return false; assert(N.getNumOperands() == 3 && "Unexpected number of operands"); SplatVal = N.getOperand(1); @@ -2965,17 +2968,25 @@ using ValidateFn = bool (*)(int64_t); +static bool selectVSplatImmHelper(SDValue N, int64_t &SplatImm) { + if (N.getOpcode() != RISCVISD::VMV_V_X_VL && + N.getOpcode() != RISCVISD::VMV_S_X_VL) + return false; + if (!N.getOperand(0).isUndef() || !isa(N.getOperand(1))) + return false; + assert(N.getNumOperands() == 3 && "Unexpected number of operands"); + + SplatImm = cast(N.getOperand(1))->getSExtValue(); + return true; +} + static bool selectVSplatSimmHelper(SDValue N, SDValue &SplatVal, SelectionDAG &DAG, const RISCVSubtarget &Subtarget, ValidateFn ValidateImm) { - if (N.getOpcode() != RISCVISD::VMV_V_X_VL || !N.getOperand(0).isUndef() || - !isa(N.getOperand(1))) + int64_t SplatImm; + if (!selectVSplatImmHelper(N, SplatImm)) return false; - assert(N.getNumOperands() == 3 && "Unexpected number of operands"); - - int64_t SplatImm = - cast(N.getOperand(1))->getSExtValue(); // The semantics of RISCVISD::VMV_V_X_VL is that when the operand // type is wider than the resulting vector element type: an implicit @@ -3019,13 +3030,10 @@ bool RISCVDAGToDAGISel::selectVSplatUimm(SDValue N, unsigned Bits, SDValue &SplatVal) { - if (N.getOpcode() != RISCVISD::VMV_V_X_VL || !N.getOperand(0).isUndef() || - !isa(N.getOperand(1))) + int64_t SplatImm; + if (!selectVSplatImmHelper(N, SplatImm)) return false; - int64_t SplatImm = - cast(N.getOperand(1))->getSExtValue(); - if (!isUIntN(Bits, SplatImm)) return false; Index: llvm/lib/Target/RISCV/RISCVISelLowering.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -3602,12 +3602,8 @@ bool HasPassthru = Passthru && !Passthru.isUndef(); if (!HasPassthru && !Passthru) Passthru = DAG.getUNDEF(VT); - if (VT.isFloatingPoint()) { - // If VL is 1, we could use vfmv.s.f. - if (isOneConstant(VL)) - return DAG.getNode(RISCVISD::VFMV_S_F_VL, DL, VT, Passthru, Scalar, VL); + if (VT.isFloatingPoint()) return DAG.getNode(RISCVISD::VFMV_V_F_VL, DL, VT, Passthru, Scalar, VL); - } MVT XLenVT = Subtarget.getXLenVT(); @@ -3620,12 +3616,6 @@ unsigned ExtOpc = isa(Scalar) ? ISD::SIGN_EXTEND : ISD::ANY_EXTEND; Scalar = DAG.getNode(ExtOpc, DL, XLenVT, Scalar); - ConstantSDNode *Const = dyn_cast(Scalar); - // If VL is 1 and the scalar value won't benefit from immediate, we could - // use vmv.s.x. - if (isOneConstant(VL) && - (!Const || isNullConstant(Scalar) || !isInt<5>(Const->getSExtValue()))) - return DAG.getNode(RISCVISD::VMV_S_X_VL, DL, VT, Passthru, Scalar, VL); return DAG.getNode(RISCVISD::VMV_V_X_VL, DL, VT, Passthru, Scalar, VL); } @@ -13894,15 +13884,39 @@ if (SDValue V = performCONCAT_VECTORSCombine(N, DAG, Subtarget, *this)) return V; break; + case RISCVISD::VFMV_V_F_VL: { + const MVT VT = N->getSimpleValueType(0); + SDValue Passthru = N->getOperand(0); + SDValue Scalar = N->getOperand(1); + SDValue VL = N->getOperand(2); + + // If VL is 1, we can use vfmv.s.f. + if (isOneConstant(VL)) + return DAG.getNode(RISCVISD::VFMV_S_F_VL, DL, VT, Passthru, Scalar, VL); + break; + } case RISCVISD::VMV_V_X_VL: { + const MVT VT = N->getSimpleValueType(0); + SDValue Passthru = N->getOperand(0); + SDValue Scalar = N->getOperand(1); + SDValue VL = N->getOperand(2); + // Tail agnostic VMV.V.X only demands the vector element bitwidth from the // scalar input. - unsigned ScalarSize = N->getOperand(1).getValueSizeInBits(); - unsigned EltWidth = N->getValueType(0).getScalarSizeInBits(); - if (ScalarSize > EltWidth && N->getOperand(0).isUndef()) + unsigned ScalarSize = Scalar.getValueSizeInBits(); + unsigned EltWidth = VT.getScalarSizeInBits(); + if (ScalarSize > EltWidth && Passthru.isUndef()) if (SimplifyDemandedLowBitsHelper(1, EltWidth)) return SDValue(N, 0); + // If VL is 1 and the scalar value won't benefit from immediate, we can + // use vmv.s.x. Only do this only if legal to avoid breaking i64 sext(i32) + // patterns on rv32.. + ConstantSDNode *Const = dyn_cast(Scalar); + if (isOneConstant(VL) && EltWidth <= Subtarget.getXLen() && + (!Const || isNullConstant(Scalar) || !isInt<5>(Const->getSExtValue()))) + return DAG.getNode(RISCVISD::VMV_S_X_VL, DL, VT, Passthru, Scalar, VL); + break; } case RISCVISD::VFMV_S_F_VL: { Index: llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td =================================================================== --- llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td +++ llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td @@ -1423,7 +1423,7 @@ foreach fvti = AllFloatVectors in { let Predicates = GetVTypePredicates.Predicates in { - def : Pat<(fvti.Vector (SplatFPOp fvti.ScalarRegClass:$rs1)), + def : Pat<(fvti.Vector (riscv_vfmv_v_f_vl undef, fvti.ScalarRegClass:$rs1, srcvalue)), (!cast("PseudoVFMV_V_"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) (fvti.Vector (IMPLICIT_DEF)), (fvti.Scalar fvti.ScalarRegClass:$rs1), Index: llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td =================================================================== --- llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td +++ llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td @@ -586,9 +586,10 @@ def SelectFPImm : ComplexPattern; -// Ignore the vl operand. -def SplatFPOp : PatFrag<(ops node:$op), - (riscv_vfmv_v_f_vl undef, node:$op, srcvalue)>; +// Ignore the vl operand on vmv_v_f, and match vmv_s_f with VL=1 +def SplatFPOp : PatFrags<(ops node:$op), + [(riscv_vfmv_v_f_vl undef, node:$op, srcvalue), + (riscv_vfmv_s_f_vl undef, node:$op, 1)]>; def sew8simm5 : ComplexPattern", []>; def sew16simm5 : ComplexPattern", []>; Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitcast.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitcast.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitcast.ll @@ -436,70 +436,46 @@ ; CHECK-LABEL: bitcast_i16_v1i16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v8, a0 +; CHECK-NEXT: vmv.s.x v8, a0 ; CHECK-NEXT: ret ; ; ELEN32-LABEL: bitcast_i16_v1i16: ; ELEN32: # %bb.0: ; ELEN32-NEXT: vsetivli zero, 1, e16, mf2, ta, ma -; ELEN32-NEXT: vmv.v.x v8, a0 +; ELEN32-NEXT: vmv.s.x v8, a0 ; ELEN32-NEXT: ret %b = bitcast i16 %a to <1 x i16> ret <1 x i16> %b } define <2 x i16> @bitcast_i32_v2i16(i32 %a) { -; RV32-LABEL: bitcast_i32_v2i16: -; RV32: # %bb.0: -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.s.x v8, a0 -; RV32-NEXT: ret -; -; RV64-LABEL: bitcast_i32_v2i16: -; RV64: # %bb.0: -; RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-NEXT: vmv.v.x v8, a0 -; RV64-NEXT: ret -; -; RV32ELEN32-LABEL: bitcast_i32_v2i16: -; RV32ELEN32: # %bb.0: -; RV32ELEN32-NEXT: vsetivli zero, 1, e32, m1, ta, ma -; RV32ELEN32-NEXT: vmv.s.x v8, a0 -; RV32ELEN32-NEXT: ret +; CHECK-LABEL: bitcast_i32_v2i16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmv.s.x v8, a0 +; CHECK-NEXT: ret ; -; RV64ELEN32-LABEL: bitcast_i32_v2i16: -; RV64ELEN32: # %bb.0: -; RV64ELEN32-NEXT: vsetivli zero, 1, e32, m1, ta, ma -; RV64ELEN32-NEXT: vmv.v.x v8, a0 -; RV64ELEN32-NEXT: ret +; ELEN32-LABEL: bitcast_i32_v2i16: +; ELEN32: # %bb.0: +; ELEN32-NEXT: vsetivli zero, 1, e32, m1, ta, ma +; ELEN32-NEXT: vmv.s.x v8, a0 +; ELEN32-NEXT: ret %b = bitcast i32 %a to <2 x i16> ret <2 x i16> %b } define <1 x i32> @bitcast_i32_v1i32(i32 %a) { -; RV32-LABEL: bitcast_i32_v1i32: -; RV32: # %bb.0: -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.s.x v8, a0 -; RV32-NEXT: ret -; -; RV64-LABEL: bitcast_i32_v1i32: -; RV64: # %bb.0: -; RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-NEXT: vmv.v.x v8, a0 -; RV64-NEXT: ret -; -; RV32ELEN32-LABEL: bitcast_i32_v1i32: -; RV32ELEN32: # %bb.0: -; RV32ELEN32-NEXT: vsetivli zero, 1, e32, m1, ta, ma -; RV32ELEN32-NEXT: vmv.s.x v8, a0 -; RV32ELEN32-NEXT: ret +; CHECK-LABEL: bitcast_i32_v1i32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmv.s.x v8, a0 +; CHECK-NEXT: ret ; -; RV64ELEN32-LABEL: bitcast_i32_v1i32: -; RV64ELEN32: # %bb.0: -; RV64ELEN32-NEXT: vsetivli zero, 1, e32, m1, ta, ma -; RV64ELEN32-NEXT: vmv.v.x v8, a0 -; RV64ELEN32-NEXT: ret +; ELEN32-LABEL: bitcast_i32_v1i32: +; ELEN32: # %bb.0: +; ELEN32-NEXT: vsetivli zero, 1, e32, m1, ta, ma +; ELEN32-NEXT: vmv.s.x v8, a0 +; ELEN32-NEXT: ret %b = bitcast i32 %a to <1 x i32> ret <1 x i32> %b } Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse-vp.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse-vp.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse-vp.ll @@ -1667,9 +1667,8 @@ ; RV32-NEXT: vor.vv v12, v14, v12, v0.t ; RV32-NEXT: vsrl.vi v14, v8, 8, v0.t ; RV32-NEXT: li a4, 85 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a4 ; RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; RV32-NEXT: vmv.s.x v0, a4 ; RV32-NEXT: vmv.v.i v16, 0 ; RV32-NEXT: lui a4, 1044480 ; RV32-NEXT: vmerge.vxm v16, v16, a4, v0 @@ -1803,9 +1802,8 @@ ; RV32-NEXT: vand.vx v12, v8, a4 ; RV32-NEXT: vsll.vi v12, v12, 24 ; RV32-NEXT: li a5, 85 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 ; RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; RV32-NEXT: vmv.s.x v0, a5 ; RV32-NEXT: vmv.v.i v14, 0 ; RV32-NEXT: lui a5, 1044480 ; RV32-NEXT: vmerge.vxm v14, v14, a5, v0 @@ -1940,9 +1938,8 @@ ; RV32-NEXT: vsrl.vi v24, v8, 8, v0.t ; RV32-NEXT: lui a4, 5 ; RV32-NEXT: addi a4, a4, 1365 -; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a4 ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-NEXT: vmv.s.x v0, a4 ; RV32-NEXT: vmv.v.i v16, 0 ; RV32-NEXT: lui a4, 1044480 ; RV32-NEXT: vmerge.vxm v16, v16, a4, v0 @@ -2077,9 +2074,8 @@ ; RV32-NEXT: vsll.vi v16, v16, 24 ; RV32-NEXT: lui a5, 5 ; RV32-NEXT: addi a5, a5, 1365 -; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-NEXT: vmv.s.x v0, a5 ; RV32-NEXT: vmv.v.i v20, 0 ; RV32-NEXT: lui a5, 1044480 ; RV32-NEXT: vmerge.vxm v20, v20, a5, v0 @@ -2255,11 +2251,9 @@ ; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, ma ; RV32-NEXT: lui a2, 349525 ; RV32-NEXT: addi a2, a2, 1365 -; RV32-NEXT: vmv.v.i v24, 0 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; RV32-NEXT: vmv.s.x v0, a2 ; RV32-NEXT: lui a7, 1044480 -; RV32-NEXT: vmv.v.x v0, a2 -; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, ma +; RV32-NEXT: vmv.v.i v24, 0 ; RV32-NEXT: vmerge.vxm v24, v24, a7, v0 ; RV32-NEXT: addi a7, sp, 16 ; RV32-NEXT: vs8r.v v24, (a7) # Unknown-size Folded Spill @@ -2552,10 +2546,8 @@ ; RV32-NEXT: vmv.v.i v24, 0 ; RV32-NEXT: lui a5, 349525 ; RV32-NEXT: addi a5, a5, 1365 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 +; RV32-NEXT: vmv.s.x v0, a5 ; RV32-NEXT: lui a6, 1044480 -; RV32-NEXT: vsetvli zero, a4, e32, m8, ta, ma ; RV32-NEXT: vmerge.vxm v24, v24, a6, v0 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma ; RV32-NEXT: vsrl.vi v0, v8, 8 @@ -2739,11 +2731,9 @@ ; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, ma ; RV32-NEXT: lui a2, 349525 ; RV32-NEXT: addi a2, a2, 1365 -; RV32-NEXT: vmv.v.i v24, 0 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; RV32-NEXT: vmv.s.x v0, a2 ; RV32-NEXT: lui a7, 1044480 -; RV32-NEXT: vmv.v.x v0, a2 -; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, ma +; RV32-NEXT: vmv.v.i v24, 0 ; RV32-NEXT: vmerge.vxm v24, v24, a7, v0 ; RV32-NEXT: addi a7, sp, 16 ; RV32-NEXT: vs8r.v v24, (a7) # Unknown-size Folded Spill @@ -3036,10 +3026,8 @@ ; RV32-NEXT: vmv.v.i v24, 0 ; RV32-NEXT: lui a5, 349525 ; RV32-NEXT: addi a5, a5, 1365 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 +; RV32-NEXT: vmv.s.x v0, a5 ; RV32-NEXT: lui a6, 1044480 -; RV32-NEXT: vsetvli zero, a4, e32, m8, ta, ma ; RV32-NEXT: vmerge.vxm v24, v24, a6, v0 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma ; RV32-NEXT: vsrl.vi v0, v8, 8 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse.ll @@ -747,8 +747,7 @@ ; LMULMAX2-RV32-NEXT: vand.vx v12, v12, a3 ; LMULMAX2-RV32-NEXT: vor.vv v10, v12, v10 ; LMULMAX2-RV32-NEXT: li a4, 85 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a4 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a4 ; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmv.v.i v12, 0 ; LMULMAX2-RV32-NEXT: lui a4, 1044480 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap-vp.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap-vp.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap-vp.ll @@ -593,9 +593,8 @@ ; RV32-NEXT: vor.vv v12, v14, v12, v0.t ; RV32-NEXT: vsrl.vi v14, v8, 8, v0.t ; RV32-NEXT: li a4, 85 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a4 ; RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; RV32-NEXT: vmv.s.x v0, a4 ; RV32-NEXT: vmv.v.i v16, 0 ; RV32-NEXT: lui a4, 1044480 ; RV32-NEXT: vmerge.vxm v16, v16, a4, v0 @@ -672,9 +671,8 @@ ; RV32-NEXT: vand.vx v12, v8, a4 ; RV32-NEXT: vsll.vi v12, v12, 24 ; RV32-NEXT: li a5, 85 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 ; RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; RV32-NEXT: vmv.s.x v0, a5 ; RV32-NEXT: vmv.v.i v14, 0 ; RV32-NEXT: lui a5, 1044480 ; RV32-NEXT: vmerge.vxm v14, v14, a5, v0 @@ -752,9 +750,8 @@ ; RV32-NEXT: vsrl.vi v24, v8, 8, v0.t ; RV32-NEXT: lui a4, 5 ; RV32-NEXT: addi a4, a4, 1365 -; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a4 ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-NEXT: vmv.s.x v0, a4 ; RV32-NEXT: vmv.v.i v16, 0 ; RV32-NEXT: lui a4, 1044480 ; RV32-NEXT: vmerge.vxm v16, v16, a4, v0 @@ -832,9 +829,8 @@ ; RV32-NEXT: vsll.vi v16, v16, 24 ; RV32-NEXT: lui a5, 5 ; RV32-NEXT: addi a5, a5, 1365 -; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-NEXT: vmv.s.x v0, a5 ; RV32-NEXT: vmv.v.i v20, 0 ; RV32-NEXT: lui a5, 1044480 ; RV32-NEXT: vmerge.vxm v20, v20, a5, v0 @@ -951,14 +947,12 @@ ; RV32-NEXT: vs8r.v v24, (a5) # Unknown-size Folded Spill ; RV32-NEXT: li a5, 32 ; RV32-NEXT: vsetvli zero, a5, e32, m8, ta, ma -; RV32-NEXT: lui a6, 349525 -; RV32-NEXT: addi a6, a6, 1365 +; RV32-NEXT: lui a5, 349525 +; RV32-NEXT: addi a5, a5, 1365 +; RV32-NEXT: vmv.s.x v0, a5 +; RV32-NEXT: lui a5, 1044480 ; RV32-NEXT: vmv.v.i v24, 0 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: lui a7, 1044480 -; RV32-NEXT: vmv.v.x v0, a6 -; RV32-NEXT: vsetvli zero, a5, e32, m8, ta, ma -; RV32-NEXT: vmerge.vxm v24, v24, a7, v0 +; RV32-NEXT: vmerge.vxm v24, v24, a5, v0 ; RV32-NEXT: addi a5, sp, 16 ; RV32-NEXT: vs8r.v v24, (a5) # Unknown-size Folded Spill ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma @@ -1103,13 +1097,11 @@ ; RV32-NEXT: li a4, 32 ; RV32-NEXT: vsetvli zero, a4, e32, m8, ta, ma ; RV32-NEXT: vmv.v.i v24, 0 -; RV32-NEXT: lui a5, 349525 -; RV32-NEXT: addi a5, a5, 1365 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 -; RV32-NEXT: lui a5, 1044480 -; RV32-NEXT: vsetvli zero, a4, e32, m8, ta, ma -; RV32-NEXT: vmerge.vxm v24, v24, a5, v0 +; RV32-NEXT: lui a4, 349525 +; RV32-NEXT: addi a4, a4, 1365 +; RV32-NEXT: vmv.s.x v0, a4 +; RV32-NEXT: lui a4, 1044480 +; RV32-NEXT: vmerge.vxm v24, v24, a4, v0 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma ; RV32-NEXT: vsrl.vi v0, v8, 8 ; RV32-NEXT: vand.vv v0, v0, v24 @@ -1235,14 +1227,12 @@ ; RV32-NEXT: vs8r.v v24, (a5) # Unknown-size Folded Spill ; RV32-NEXT: li a5, 32 ; RV32-NEXT: vsetvli zero, a5, e32, m8, ta, ma -; RV32-NEXT: lui a6, 349525 -; RV32-NEXT: addi a6, a6, 1365 +; RV32-NEXT: lui a5, 349525 +; RV32-NEXT: addi a5, a5, 1365 +; RV32-NEXT: vmv.s.x v0, a5 +; RV32-NEXT: lui a5, 1044480 ; RV32-NEXT: vmv.v.i v24, 0 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: lui a7, 1044480 -; RV32-NEXT: vmv.v.x v0, a6 -; RV32-NEXT: vsetvli zero, a5, e32, m8, ta, ma -; RV32-NEXT: vmerge.vxm v24, v24, a7, v0 +; RV32-NEXT: vmerge.vxm v24, v24, a5, v0 ; RV32-NEXT: addi a5, sp, 16 ; RV32-NEXT: vs8r.v v24, (a5) # Unknown-size Folded Spill ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma @@ -1387,13 +1377,11 @@ ; RV32-NEXT: li a4, 32 ; RV32-NEXT: vsetvli zero, a4, e32, m8, ta, ma ; RV32-NEXT: vmv.v.i v24, 0 -; RV32-NEXT: lui a5, 349525 -; RV32-NEXT: addi a5, a5, 1365 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a5 -; RV32-NEXT: lui a5, 1044480 -; RV32-NEXT: vsetvli zero, a4, e32, m8, ta, ma -; RV32-NEXT: vmerge.vxm v24, v24, a5, v0 +; RV32-NEXT: lui a4, 349525 +; RV32-NEXT: addi a4, a4, 1365 +; RV32-NEXT: vmv.s.x v0, a4 +; RV32-NEXT: lui a4, 1044480 +; RV32-NEXT: vmerge.vxm v24, v24, a4, v0 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma ; RV32-NEXT: vsrl.vi v0, v8, 8 ; RV32-NEXT: vand.vv v0, v0, v24 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap.ll @@ -368,8 +368,7 @@ ; LMULMAX2-RV32-NEXT: vand.vx v12, v12, a3 ; LMULMAX2-RV32-NEXT: vor.vv v10, v12, v10 ; LMULMAX2-RV32-NEXT: li a4, 85 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a4 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a4 ; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmv.v.i v12, 0 ; LMULMAX2-RV32-NEXT: lui a4, 1044480 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-deinterleave-load.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-deinterleave-load.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-deinterleave-load.ll @@ -24,7 +24,7 @@ ; RV32-NEXT: lui a0, 16 ; RV32-NEXT: addi a0, a0, -256 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV32-NEXT: vrgather.vv v9, v8, v12, v0.t ; RV32-NEXT: vmsne.vi v9, v9, 0 @@ -55,7 +55,7 @@ ; RV64-NEXT: lui a0, 16 ; RV64-NEXT: addiw a0, a0, -256 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV64-NEXT: vrgather.vv v9, v8, v12, v0.t ; RV64-NEXT: vmsne.vi v9, v9, 0 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-i1.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-i1.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-i1.ll @@ -11,7 +11,7 @@ ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma ; CHECK-NEXT: vle8.v v8, (a0) ; CHECK-NEXT: vmseq.vi v0, v8, 0 -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0 ; CHECK-NEXT: vslidedown.vx v8, v8, a1 ; CHECK-NEXT: vmv.x.s a0, v8 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-bitcast.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-bitcast.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-bitcast.ll @@ -157,40 +157,28 @@ ; CHECK-LABEL: bitcast_i16_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v8, a0 +; CHECK-NEXT: vmv.s.x v8, a0 ; CHECK-NEXT: ret %b = bitcast i16 %a to <1 x half> ret <1 x half> %b } define <2 x half> @bitcast_i32_v2f16(i32 %a) { -; RV32-FP-LABEL: bitcast_i32_v2f16: -; RV32-FP: # %bb.0: -; RV32-FP-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-FP-NEXT: vmv.s.x v8, a0 -; RV32-FP-NEXT: ret -; -; RV64-FP-LABEL: bitcast_i32_v2f16: -; RV64-FP: # %bb.0: -; RV64-FP-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-FP-NEXT: vmv.v.x v8, a0 -; RV64-FP-NEXT: ret +; CHECK-LABEL: bitcast_i32_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmv.s.x v8, a0 +; CHECK-NEXT: ret %b = bitcast i32 %a to <2 x half> ret <2 x half> %b } define <1 x float> @bitcast_i32_v1f32(i32 %a) { -; RV32-FP-LABEL: bitcast_i32_v1f32: -; RV32-FP: # %bb.0: -; RV32-FP-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-FP-NEXT: vmv.s.x v8, a0 -; RV32-FP-NEXT: ret -; -; RV64-FP-LABEL: bitcast_i32_v1f32: -; RV64-FP: # %bb.0: -; RV64-FP-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-FP-NEXT: vmv.v.x v8, a0 -; RV64-FP-NEXT: ret +; CHECK-LABEL: bitcast_i32_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmv.s.x v8, a0 +; CHECK-NEXT: ret %b = bitcast i32 %a to <1 x float> ret <1 x float> %b } Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-interleave.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-interleave.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-interleave.ll @@ -255,48 +255,56 @@ ; RV32-V128-NEXT: addi sp, sp, -16 ; RV32-V128-NEXT: .cfi_def_cfa_offset 16 ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 4 +; RV32-V128-NEXT: li a1, 24 +; RV32-V128-NEXT: mul a0, a0, a1 ; RV32-V128-NEXT: sub sp, sp, a0 -; RV32-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb +; RV32-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb +; RV32-V128-NEXT: csrr a0, vlenb +; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: add a0, sp, a0 +; RV32-V128-NEXT: addi a0, a0, 16 +; RV32-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill +; RV32-V128-NEXT: addi a0, sp, 16 +; RV32-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill ; RV32-V128-NEXT: lui a0, %hi(.LCPI10_0) ; RV32-V128-NEXT: addi a0, a0, %lo(.LCPI10_0) ; RV32-V128-NEXT: li a1, 32 -; RV32-V128-NEXT: vsetvli zero, a1, e32, m8, ta, ma -; RV32-V128-NEXT: vle32.v v0, (a0) -; RV32-V128-NEXT: vmv8r.v v24, v8 -; RV32-V128-NEXT: addi a0, sp, 16 -; RV32-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill -; RV32-V128-NEXT: vrgather.vv v8, v24, v0 +; RV32-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV32-V128-NEXT: vle32.v v24, (a0) ; RV32-V128-NEXT: lui a0, %hi(.LCPI10_1) ; RV32-V128-NEXT: addi a0, a0, %lo(.LCPI10_1) -; RV32-V128-NEXT: vle32.v v24, (a0) +; RV32-V128-NEXT: vle32.v v16, (a0) ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: slli a0, a0, 4 ; RV32-V128-NEXT: add a0, sp, a0 ; RV32-V128-NEXT: addi a0, a0, 16 -; RV32-V128-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill +; RV32-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill ; RV32-V128-NEXT: lui a0, 699051 ; RV32-V128-NEXT: addi a0, a0, -1366 -; RV32-V128-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-V128-NEXT: vmv.v.x v0, a0 -; RV32-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV32-V128-NEXT: vmv.s.x v0, a0 +; RV32-V128-NEXT: vrgather.vv v16, v8, v24 ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: slli a0, a0, 4 ; RV32-V128-NEXT: add a0, sp, a0 ; RV32-V128-NEXT: addi a0, a0, 16 ; RV32-V128-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload -; RV32-V128-NEXT: vrgather.vv v8, v16, v24, v0.t -; RV32-V128-NEXT: vmv.v.v v24, v8 +; RV32-V128-NEXT: csrr a0, vlenb +; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: add a0, sp, a0 +; RV32-V128-NEXT: addi a0, a0, 16 +; RV32-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload +; RV32-V128-NEXT: vrgather.vv v16, v8, v24, v0.t ; RV32-V128-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-V128-NEXT: vmv4r.v v24, v8 ; RV32-V128-NEXT: addi a0, sp, 16 ; RV32-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload -; RV32-V128-NEXT: vwaddu.vv v0, v8, v16 +; RV32-V128-NEXT: vwaddu.vv v0, v8, v24 ; RV32-V128-NEXT: li a0, -1 -; RV32-V128-NEXT: vwmaccu.vx v0, a0, v16 +; RV32-V128-NEXT: vwmaccu.vx v0, a0, v24 ; RV32-V128-NEXT: vmv8r.v v8, v0 -; RV32-V128-NEXT: vmv8r.v v16, v24 ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 4 +; RV32-V128-NEXT: li a1, 24 +; RV32-V128-NEXT: mul a0, a0, a1 ; RV32-V128-NEXT: add sp, sp, a0 ; RV32-V128-NEXT: addi sp, sp, 16 ; RV32-V128-NEXT: ret @@ -306,48 +314,56 @@ ; RV64-V128-NEXT: addi sp, sp, -16 ; RV64-V128-NEXT: .cfi_def_cfa_offset 16 ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 4 +; RV64-V128-NEXT: li a1, 24 +; RV64-V128-NEXT: mul a0, a0, a1 ; RV64-V128-NEXT: sub sp, sp, a0 -; RV64-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb +; RV64-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb +; RV64-V128-NEXT: csrr a0, vlenb +; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: add a0, sp, a0 +; RV64-V128-NEXT: addi a0, a0, 16 +; RV64-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill +; RV64-V128-NEXT: addi a0, sp, 16 +; RV64-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill ; RV64-V128-NEXT: lui a0, %hi(.LCPI10_0) ; RV64-V128-NEXT: addi a0, a0, %lo(.LCPI10_0) ; RV64-V128-NEXT: li a1, 32 -; RV64-V128-NEXT: vsetvli zero, a1, e32, m8, ta, ma -; RV64-V128-NEXT: vle32.v v0, (a0) -; RV64-V128-NEXT: vmv8r.v v24, v8 -; RV64-V128-NEXT: addi a0, sp, 16 -; RV64-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill -; RV64-V128-NEXT: vrgather.vv v8, v24, v0 +; RV64-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV64-V128-NEXT: vle32.v v24, (a0) ; RV64-V128-NEXT: lui a0, %hi(.LCPI10_1) ; RV64-V128-NEXT: addi a0, a0, %lo(.LCPI10_1) -; RV64-V128-NEXT: vle32.v v24, (a0) +; RV64-V128-NEXT: vle32.v v16, (a0) ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: slli a0, a0, 4 ; RV64-V128-NEXT: add a0, sp, a0 ; RV64-V128-NEXT: addi a0, a0, 16 -; RV64-V128-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill +; RV64-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill ; RV64-V128-NEXT: lui a0, 699051 ; RV64-V128-NEXT: addiw a0, a0, -1366 -; RV64-V128-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-V128-NEXT: vmv.v.x v0, a0 -; RV64-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV64-V128-NEXT: vmv.s.x v0, a0 +; RV64-V128-NEXT: vrgather.vv v16, v8, v24 ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: slli a0, a0, 4 ; RV64-V128-NEXT: add a0, sp, a0 ; RV64-V128-NEXT: addi a0, a0, 16 ; RV64-V128-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload -; RV64-V128-NEXT: vrgather.vv v8, v16, v24, v0.t -; RV64-V128-NEXT: vmv.v.v v24, v8 +; RV64-V128-NEXT: csrr a0, vlenb +; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: add a0, sp, a0 +; RV64-V128-NEXT: addi a0, a0, 16 +; RV64-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload +; RV64-V128-NEXT: vrgather.vv v16, v8, v24, v0.t ; RV64-V128-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV64-V128-NEXT: vmv4r.v v24, v8 ; RV64-V128-NEXT: addi a0, sp, 16 ; RV64-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload -; RV64-V128-NEXT: vwaddu.vv v0, v8, v16 +; RV64-V128-NEXT: vwaddu.vv v0, v8, v24 ; RV64-V128-NEXT: li a0, -1 -; RV64-V128-NEXT: vwmaccu.vx v0, a0, v16 +; RV64-V128-NEXT: vwmaccu.vx v0, a0, v24 ; RV64-V128-NEXT: vmv8r.v v8, v0 -; RV64-V128-NEXT: vmv8r.v v16, v24 ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 4 +; RV64-V128-NEXT: li a1, 24 +; RV64-V128-NEXT: mul a0, a0, a1 ; RV64-V128-NEXT: add sp, sp, a0 ; RV64-V128-NEXT: addi sp, sp, 16 ; RV64-V128-NEXT: ret Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-shuffles.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-shuffles.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-shuffles.ll @@ -18,9 +18,8 @@ ; CHECK-LABEL: shuffle_v8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: li a0, 236 -; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0 ; CHECK-NEXT: ret %s = shufflevector <8 x float> %x, <8 x float> %y, <8 x i32> Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-i1.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-i1.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-i1.ll @@ -9,7 +9,7 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: andi a0, a0, 1 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v8, a0 +; CHECK-NEXT: vmv.s.x v8, a0 ; CHECK-NEXT: vmsne.vi v0, v8, 0 ; CHECK-NEXT: ret %y = insertelement <1 x i1> %x, i1 %elt, i64 0 @@ -20,7 +20,7 @@ ; CHECK-LABEL: insertelt_idx_v1i1: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0 ; CHECK-NEXT: addi a2, a1, 1 ; CHECK-NEXT: vmv.s.x v9, a0 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll @@ -603,13 +603,13 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: li a1, 73 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a1 +; CHECK-NEXT: vmv.s.x v0, a1 ; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; CHECK-NEXT: vmv.v.i v8, 3 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0 ; CHECK-NEXT: li a1, 146 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a1 +; CHECK-NEXT: vmv.s.x v0, a1 ; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; CHECK-NEXT: vmerge.vim v8, v8, 2, v0 ; CHECK-NEXT: vsetivli zero, 9, e8, m1, ta, ma Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-interleave.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-interleave.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-interleave.ll @@ -414,48 +414,56 @@ ; RV32-V128-NEXT: addi sp, sp, -16 ; RV32-V128-NEXT: .cfi_def_cfa_offset 16 ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 4 +; RV32-V128-NEXT: li a1, 24 +; RV32-V128-NEXT: mul a0, a0, a1 ; RV32-V128-NEXT: sub sp, sp, a0 -; RV32-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb +; RV32-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb +; RV32-V128-NEXT: csrr a0, vlenb +; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: add a0, sp, a0 +; RV32-V128-NEXT: addi a0, a0, 16 +; RV32-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill +; RV32-V128-NEXT: addi a0, sp, 16 +; RV32-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill ; RV32-V128-NEXT: lui a0, %hi(.LCPI17_0) ; RV32-V128-NEXT: addi a0, a0, %lo(.LCPI17_0) ; RV32-V128-NEXT: li a1, 32 -; RV32-V128-NEXT: vsetvli zero, a1, e32, m8, ta, ma -; RV32-V128-NEXT: vle32.v v0, (a0) -; RV32-V128-NEXT: vmv8r.v v24, v8 -; RV32-V128-NEXT: addi a0, sp, 16 -; RV32-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill -; RV32-V128-NEXT: vrgather.vv v8, v24, v0 +; RV32-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV32-V128-NEXT: vle32.v v24, (a0) ; RV32-V128-NEXT: lui a0, %hi(.LCPI17_1) ; RV32-V128-NEXT: addi a0, a0, %lo(.LCPI17_1) -; RV32-V128-NEXT: vle32.v v24, (a0) +; RV32-V128-NEXT: vle32.v v16, (a0) ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: slli a0, a0, 4 ; RV32-V128-NEXT: add a0, sp, a0 ; RV32-V128-NEXT: addi a0, a0, 16 -; RV32-V128-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill +; RV32-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill ; RV32-V128-NEXT: lui a0, 699051 ; RV32-V128-NEXT: addi a0, a0, -1366 -; RV32-V128-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-V128-NEXT: vmv.v.x v0, a0 -; RV32-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV32-V128-NEXT: vmv.s.x v0, a0 +; RV32-V128-NEXT: vrgather.vv v16, v8, v24 ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: slli a0, a0, 4 ; RV32-V128-NEXT: add a0, sp, a0 ; RV32-V128-NEXT: addi a0, a0, 16 ; RV32-V128-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload -; RV32-V128-NEXT: vrgather.vv v8, v16, v24, v0.t -; RV32-V128-NEXT: vmv.v.v v24, v8 +; RV32-V128-NEXT: csrr a0, vlenb +; RV32-V128-NEXT: slli a0, a0, 3 +; RV32-V128-NEXT: add a0, sp, a0 +; RV32-V128-NEXT: addi a0, a0, 16 +; RV32-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload +; RV32-V128-NEXT: vrgather.vv v16, v8, v24, v0.t ; RV32-V128-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-V128-NEXT: vmv4r.v v24, v8 ; RV32-V128-NEXT: addi a0, sp, 16 ; RV32-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload -; RV32-V128-NEXT: vwaddu.vv v0, v8, v16 +; RV32-V128-NEXT: vwaddu.vv v0, v8, v24 ; RV32-V128-NEXT: li a0, -1 -; RV32-V128-NEXT: vwmaccu.vx v0, a0, v16 +; RV32-V128-NEXT: vwmaccu.vx v0, a0, v24 ; RV32-V128-NEXT: vmv8r.v v8, v0 -; RV32-V128-NEXT: vmv8r.v v16, v24 ; RV32-V128-NEXT: csrr a0, vlenb -; RV32-V128-NEXT: slli a0, a0, 4 +; RV32-V128-NEXT: li a1, 24 +; RV32-V128-NEXT: mul a0, a0, a1 ; RV32-V128-NEXT: add sp, sp, a0 ; RV32-V128-NEXT: addi sp, sp, 16 ; RV32-V128-NEXT: ret @@ -465,48 +473,56 @@ ; RV64-V128-NEXT: addi sp, sp, -16 ; RV64-V128-NEXT: .cfi_def_cfa_offset 16 ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 4 +; RV64-V128-NEXT: li a1, 24 +; RV64-V128-NEXT: mul a0, a0, a1 ; RV64-V128-NEXT: sub sp, sp, a0 -; RV64-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb +; RV64-V128-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb +; RV64-V128-NEXT: csrr a0, vlenb +; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: add a0, sp, a0 +; RV64-V128-NEXT: addi a0, a0, 16 +; RV64-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill +; RV64-V128-NEXT: addi a0, sp, 16 +; RV64-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill ; RV64-V128-NEXT: lui a0, %hi(.LCPI17_0) ; RV64-V128-NEXT: addi a0, a0, %lo(.LCPI17_0) ; RV64-V128-NEXT: li a1, 32 -; RV64-V128-NEXT: vsetvli zero, a1, e32, m8, ta, ma -; RV64-V128-NEXT: vle32.v v0, (a0) -; RV64-V128-NEXT: vmv8r.v v24, v8 -; RV64-V128-NEXT: addi a0, sp, 16 -; RV64-V128-NEXT: vs8r.v v8, (a0) # Unknown-size Folded Spill -; RV64-V128-NEXT: vrgather.vv v8, v24, v0 +; RV64-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV64-V128-NEXT: vle32.v v24, (a0) ; RV64-V128-NEXT: lui a0, %hi(.LCPI17_1) ; RV64-V128-NEXT: addi a0, a0, %lo(.LCPI17_1) -; RV64-V128-NEXT: vle32.v v24, (a0) +; RV64-V128-NEXT: vle32.v v16, (a0) ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: slli a0, a0, 4 ; RV64-V128-NEXT: add a0, sp, a0 ; RV64-V128-NEXT: addi a0, a0, 16 -; RV64-V128-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill +; RV64-V128-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill ; RV64-V128-NEXT: lui a0, 699051 ; RV64-V128-NEXT: addiw a0, a0, -1366 -; RV64-V128-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-V128-NEXT: vmv.v.x v0, a0 -; RV64-V128-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV64-V128-NEXT: vmv.s.x v0, a0 +; RV64-V128-NEXT: vrgather.vv v16, v8, v24 ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: slli a0, a0, 4 ; RV64-V128-NEXT: add a0, sp, a0 ; RV64-V128-NEXT: addi a0, a0, 16 ; RV64-V128-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload -; RV64-V128-NEXT: vrgather.vv v8, v16, v24, v0.t -; RV64-V128-NEXT: vmv.v.v v24, v8 +; RV64-V128-NEXT: csrr a0, vlenb +; RV64-V128-NEXT: slli a0, a0, 3 +; RV64-V128-NEXT: add a0, sp, a0 +; RV64-V128-NEXT: addi a0, a0, 16 +; RV64-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload +; RV64-V128-NEXT: vrgather.vv v16, v8, v24, v0.t ; RV64-V128-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV64-V128-NEXT: vmv4r.v v24, v8 ; RV64-V128-NEXT: addi a0, sp, 16 ; RV64-V128-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload -; RV64-V128-NEXT: vwaddu.vv v0, v8, v16 +; RV64-V128-NEXT: vwaddu.vv v0, v8, v24 ; RV64-V128-NEXT: li a0, -1 -; RV64-V128-NEXT: vwmaccu.vx v0, a0, v16 +; RV64-V128-NEXT: vwmaccu.vx v0, a0, v24 ; RV64-V128-NEXT: vmv8r.v v8, v0 -; RV64-V128-NEXT: vmv8r.v v16, v24 ; RV64-V128-NEXT: csrr a0, vlenb -; RV64-V128-NEXT: slli a0, a0, 4 +; RV64-V128-NEXT: li a1, 24 +; RV64-V128-NEXT: mul a0, a0, a1 ; RV64-V128-NEXT: add sp, sp, a0 ; RV64-V128-NEXT: addi sp, sp, 16 ; RV64-V128-NEXT: ret Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll @@ -18,9 +18,8 @@ ; CHECK-LABEL: shuffle_v8i32: ; CHECK: # %bb.0: ; CHECK-NEXT: li a0, 203 -; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0 ; CHECK-NEXT: ret %s = shufflevector <8 x i32> %x, <8 x i32> %y, <8 x i32> @@ -179,36 +178,32 @@ ; RV32: # %bb.0: ; RV32-NEXT: vsetivli zero, 8, e16, m1, ta, ma ; RV32-NEXT: vmv.v.i v16, 2 +; RV32-NEXT: li a0, 5 +; RV32-NEXT: vslide1down.vx v20, v16, a0 ; RV32-NEXT: lui a0, %hi(.LCPI11_0) ; RV32-NEXT: addi a0, a0, %lo(.LCPI11_0) -; RV32-NEXT: vle16.v v20, (a0) -; RV32-NEXT: li a0, 5 -; RV32-NEXT: vslide1down.vx v21, v16, a0 -; RV32-NEXT: vsetvli zero, zero, e64, m4, ta, ma -; RV32-NEXT: vrgatherei16.vv v16, v8, v20 +; RV32-NEXT: vle16.v v21, (a0) +; RV32-NEXT: vsetvli zero, zero, e64, m4, ta, mu ; RV32-NEXT: li a0, 164 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 -; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, mu -; RV32-NEXT: vrgatherei16.vv v16, v12, v21, v0.t +; RV32-NEXT: vmv.s.x v0, a0 +; RV32-NEXT: vrgatherei16.vv v16, v8, v21 +; RV32-NEXT: vrgatherei16.vv v16, v12, v20, v0.t ; RV32-NEXT: vmv.v.v v8, v16 ; RV32-NEXT: ret ; ; RV64-LABEL: vrgather_shuffle_vv_v8i64: ; RV64: # %bb.0: -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: lui a0, %hi(.LCPI11_0) ; RV64-NEXT: addi a0, a0, %lo(.LCPI11_0) ; RV64-NEXT: vle64.v v20, (a0) -; RV64-NEXT: vmv.v.i v16, 2 -; RV64-NEXT: li a0, 5 -; RV64-NEXT: vslide1down.vx v24, v16, a0 +; RV64-NEXT: vmv.v.i v24, 2 ; RV64-NEXT: vrgather.vv v16, v8, v20 ; RV64-NEXT: li a0, 164 -; RV64-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu -; RV64-NEXT: vrgather.vv v16, v12, v24, v0.t +; RV64-NEXT: vmv.s.x v0, a0 +; RV64-NEXT: li a0, 5 +; RV64-NEXT: vslide1down.vx v8, v24, a0 +; RV64-NEXT: vrgather.vv v16, v12, v8, v0.t ; RV64-NEXT: vmv.v.v v8, v16 ; RV64-NEXT: ret %s = shufflevector <8 x i64> %x, <8 x i64> %y, <8 x i32> @@ -220,18 +215,16 @@ ; RV32: # %bb.0: ; RV32-NEXT: lui a0, %hi(.LCPI12_0) ; RV32-NEXT: addi a0, a0, %lo(.LCPI12_0) -; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV32-NEXT: vle16.v v16, (a0) ; RV32-NEXT: vmv.v.i v20, -1 -; RV32-NEXT: vrgatherei16.vv v12, v20, v16 ; RV32-NEXT: lui a0, %hi(.LCPI12_1) ; RV32-NEXT: addi a0, a0, %lo(.LCPI12_1) -; RV32-NEXT: vle16.v v16, (a0) +; RV32-NEXT: vle16.v v17, (a0) ; RV32-NEXT: li a0, 113 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 -; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, mu -; RV32-NEXT: vrgatherei16.vv v12, v8, v16, v0.t +; RV32-NEXT: vmv.s.x v0, a0 +; RV32-NEXT: vrgatherei16.vv v12, v20, v16 +; RV32-NEXT: vrgatherei16.vv v12, v8, v17, v0.t ; RV32-NEXT: vmv.v.v v8, v12 ; RV32-NEXT: ret ; @@ -239,12 +232,10 @@ ; RV64: # %bb.0: ; RV64-NEXT: lui a0, %hi(.LCPI12_0) ; RV64-NEXT: addi a0, a0, %lo(.LCPI12_0) -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: vle64.v v16, (a0) ; RV64-NEXT: li a0, 113 -; RV64-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vmv.v.i v12, -1 ; RV64-NEXT: vrgather.vv v12, v8, v16, v0.t ; RV64-NEXT: vmv.v.v v8, v12 @@ -258,16 +249,14 @@ ; RV32: # %bb.0: ; RV32-NEXT: lui a0, %hi(.LCPI13_0) ; RV32-NEXT: addi a0, a0, %lo(.LCPI13_0) -; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV32-NEXT: vle16.v v16, (a0) ; RV32-NEXT: vrgatherei16.vv v12, v8, v16 ; RV32-NEXT: lui a0, %hi(.LCPI13_1) ; RV32-NEXT: addi a0, a0, %lo(.LCPI13_1) ; RV32-NEXT: vle16.v v8, (a0) ; RV32-NEXT: li a0, 140 -; RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 -; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vmv.v.i v16, 5 ; RV32-NEXT: vrgatherei16.vv v12, v16, v8, v0.t ; RV32-NEXT: vmv.v.v v8, v12 @@ -277,12 +266,10 @@ ; RV64: # %bb.0: ; RV64-NEXT: lui a0, %hi(.LCPI13_0) ; RV64-NEXT: addi a0, a0, %lo(.LCPI13_0) -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: vle64.v v16, (a0) ; RV64-NEXT: li a0, 115 -; RV64-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vmv.v.i v12, 5 ; RV64-NEXT: vrgather.vv v12, v8, v16, v0.t ; RV64-NEXT: vmv.v.v v8, v12 @@ -389,7 +376,7 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; CHECK-NEXT: li a0, 66 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vi v10, v8, 2 ; CHECK-NEXT: vrgather.vi v10, v9, 0, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -408,7 +395,7 @@ ; CHECK-NEXT: vmv.s.x v11, a0 ; CHECK-NEXT: vsetvli zero, zero, e8, mf2, ta, mu ; CHECK-NEXT: li a0, 66 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: vrgather.vi v10, v9, 0, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -425,7 +412,7 @@ ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma ; CHECK-NEXT: vmv.v.i v8, 4 ; CHECK-NEXT: li a0, 67 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -443,7 +430,7 @@ ; RV32-NEXT: vmv.v.x v11, a0 ; RV32-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; RV32-NEXT: li a0, 66 -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vrgather.vv v10, v8, v11 ; RV32-NEXT: vrgather.vi v10, v9, 0, v0.t ; RV32-NEXT: vmv1r.v v8, v10 @@ -457,7 +444,7 @@ ; RV64-NEXT: vmv.v.x v11, a0 ; RV64-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; RV64-NEXT: li a0, 66 -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vrgather.vv v10, v8, v11 ; RV64-NEXT: vrgather.vi v10, v9, 0, v0.t ; RV64-NEXT: vmv1r.v v8, v10 @@ -476,7 +463,7 @@ ; CHECK-NEXT: vslideup.vi v11, v10, 2 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; CHECK-NEXT: li a0, 70 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vi v10, v8, 2 ; CHECK-NEXT: vrgather.vv v10, v9, v11, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -499,7 +486,7 @@ ; RV32-NEXT: vmv.v.x v12, a0 ; RV32-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; RV32-NEXT: li a0, 98 -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vrgather.vv v10, v8, v12 ; RV32-NEXT: vrgather.vv v10, v9, v11, v0.t ; RV32-NEXT: vmv1r.v v8, v10 @@ -518,7 +505,7 @@ ; RV64-NEXT: vmv.v.x v12, a0 ; RV64-NEXT: vsetivli zero, 8, e8, mf2, ta, mu ; RV64-NEXT: li a0, 98 -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vrgather.vv v10, v8, v12 ; RV64-NEXT: vrgather.vv v10, v9, v11, v0.t ; RV64-NEXT: vmv1r.v v8, v10 @@ -668,7 +655,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: li a0, 224 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vadd.vi v8, v11, -4 ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -684,7 +671,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: li a0, 144 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vadd.vi v8, v11, -4 ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -731,7 +718,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vadd.vi v12, v11, 1 ; CHECK-NEXT: li a0, 195 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v8, v12 ; CHECK-NEXT: vrgather.vv v10, v9, v11, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -749,7 +736,7 @@ ; CHECK-NEXT: vadd.vi v12, v11, 2 ; CHECK-NEXT: vrgather.vv v10, v8, v12 ; CHECK-NEXT: li a0, 234 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vadd.vi v8, v11, -1 ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -769,7 +756,7 @@ ; CHECK-NEXT: addi a0, a0, %lo(.LCPI46_0) ; CHECK-NEXT: vle8.v v12, (a0) ; CHECK-NEXT: li a0, 234 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: vrgather.vv v10, v9, v12, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-splat.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-splat.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-splat.ll @@ -822,11 +822,9 @@ ; LMULMAX2-RV32-NEXT: addi a0, a0, 32 ; LMULMAX2-RV32-NEXT: vle64.v v14, (a0) ; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v16, a2 ; LMULMAX2-RV32-NEXT: li a0, 85 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a0 -; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a0 +; LMULMAX2-RV32-NEXT: vmv.v.x v16, a2 ; LMULMAX2-RV32-NEXT: vmerge.vxm v16, v16, a1, v0 ; LMULMAX2-RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma ; LMULMAX2-RV32-NEXT: vadd.vv v14, v14, v16 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int.ll @@ -1108,7 +1108,7 @@ ; RV32-NEXT: lui a1, 3 ; RV32-NEXT: addi a1, a1, -2044 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a1 +; RV32-NEXT: vmv.s.x v0, a1 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV32-NEXT: vmv.v.i v9, 0 ; RV32-NEXT: li a1, -128 @@ -1116,7 +1116,7 @@ ; RV32-NEXT: lui a1, 1 ; RV32-NEXT: addi a2, a1, 32 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a2 +; RV32-NEXT: vmv.s.x v0, a2 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV32-NEXT: lui a2, %hi(.LCPI65_0) ; RV32-NEXT: addi a2, a2, %lo(.LCPI65_0) @@ -1129,19 +1129,19 @@ ; RV32-NEXT: vadd.vv v8, v8, v9 ; RV32-NEXT: li a2, 513 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a2 +; RV32-NEXT: vmv.s.x v0, a2 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV32-NEXT: vmv.v.i v9, 4 ; RV32-NEXT: vmerge.vim v9, v9, 1, v0 ; RV32-NEXT: addi a1, a1, 78 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a1 +; RV32-NEXT: vmv.s.x v0, a1 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV32-NEXT: vmerge.vim v9, v9, 3, v0 ; RV32-NEXT: lui a1, 8 ; RV32-NEXT: addi a1, a1, 304 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a1 +; RV32-NEXT: vmv.s.x v0, a1 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV32-NEXT: vmerge.vim v9, v9, 2, v0 ; RV32-NEXT: vsrl.vv v8, v8, v9 @@ -1155,7 +1155,7 @@ ; RV64-NEXT: lui a1, 3 ; RV64-NEXT: addiw a1, a1, -2044 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV64-NEXT: vmv.v.i v9, 0 ; RV64-NEXT: li a1, -128 @@ -1163,7 +1163,7 @@ ; RV64-NEXT: lui a1, 1 ; RV64-NEXT: addiw a2, a1, 32 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a2 +; RV64-NEXT: vmv.s.x v0, a2 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV64-NEXT: lui a2, %hi(.LCPI65_0) ; RV64-NEXT: addi a2, a2, %lo(.LCPI65_0) @@ -1176,19 +1176,19 @@ ; RV64-NEXT: vadd.vv v8, v8, v9 ; RV64-NEXT: li a2, 513 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a2 +; RV64-NEXT: vmv.s.x v0, a2 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV64-NEXT: vmv.v.i v9, 4 ; RV64-NEXT: vmerge.vim v9, v9, 1, v0 ; RV64-NEXT: addiw a1, a1, 78 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV64-NEXT: vmerge.vim v9, v9, 3, v0 ; RV64-NEXT: lui a1, 8 ; RV64-NEXT: addiw a1, a1, 304 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV64-NEXT: vmerge.vim v9, v9, 2, v0 ; RV64-NEXT: vsrl.vv v8, v8, v9 @@ -1224,7 +1224,7 @@ ; CHECK-NEXT: vmulhu.vv v8, v8, v10 ; CHECK-NEXT: vadd.vv v8, v8, v9 ; CHECK-NEXT: li a1, 33 -; CHECK-NEXT: vmv.v.x v0, a1 +; CHECK-NEXT: vmv.s.x v0, a1 ; CHECK-NEXT: vmv.v.i v9, 3 ; CHECK-NEXT: vmerge.vim v9, v9, 2, v0 ; CHECK-NEXT: vsetivli zero, 7, e16, m1, tu, ma @@ -1355,7 +1355,7 @@ ; RV32-NEXT: lui a1, 5 ; RV32-NEXT: addi a1, a1, -1452 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a1 +; RV32-NEXT: vmv.s.x v0, a1 ; RV32-NEXT: li a1, 57 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV32-NEXT: vmerge.vxm v9, v9, a1, v0 @@ -1375,7 +1375,7 @@ ; RV64-NEXT: lui a1, 5 ; RV64-NEXT: addiw a1, a1, -1452 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: li a1, 57 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; RV64-NEXT: vmerge.vxm v9, v9, a1, v0 @@ -1400,7 +1400,7 @@ ; RV32-NEXT: addi a1, a1, -1755 ; RV32-NEXT: vmv.v.x v9, a1 ; RV32-NEXT: li a1, 105 -; RV32-NEXT: vmv.v.x v0, a1 +; RV32-NEXT: vmv.s.x v0, a1 ; RV32-NEXT: lui a1, 1048571 ; RV32-NEXT: addi a1, a1, 1755 ; RV32-NEXT: vmerge.vxm v9, v9, a1, v0 @@ -1419,7 +1419,7 @@ ; RV64-NEXT: addiw a1, a1, -1755 ; RV64-NEXT: vmv.v.x v9, a1 ; RV64-NEXT: li a1, 105 -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: lui a1, 1048571 ; RV64-NEXT: addiw a1, a1, 1755 ; RV64-NEXT: vmerge.vxm v9, v9, a1, v0 @@ -4958,14 +4958,14 @@ ; LMULMAX2-RV32-NEXT: lui a2, 163907 ; LMULMAX2-RV32-NEXT: addi a2, a2, -2044 ; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: li a2, -128 ; LMULMAX2-RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vxm v12, v10, a2, v0 ; LMULMAX2-RV32-NEXT: lui a2, 66049 ; LMULMAX2-RV32-NEXT: addi a2, a2, 32 ; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV32-NEXT: lui a2, %hi(.LCPI181_0) ; LMULMAX2-RV32-NEXT: addi a2, a2, %lo(.LCPI181_0) @@ -4980,19 +4980,19 @@ ; LMULMAX2-RV32-NEXT: lui a2, 8208 ; LMULMAX2-RV32-NEXT: addi a2, a2, 513 ; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vim v10, v10, 1, v0 ; LMULMAX2-RV32-NEXT: lui a2, 66785 ; LMULMAX2-RV32-NEXT: addi a2, a2, 78 ; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vim v10, v10, 3, v0 ; LMULMAX2-RV32-NEXT: lui a2, 529160 ; LMULMAX2-RV32-NEXT: addi a2, a2, 304 ; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vim v10, v10, 2, v0 ; LMULMAX2-RV32-NEXT: vsrl.vv v8, v8, v10 @@ -5008,14 +5008,14 @@ ; LMULMAX2-RV64-NEXT: lui a2, 163907 ; LMULMAX2-RV64-NEXT: addiw a2, a2, -2044 ; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV64-NEXT: li a2, -128 ; LMULMAX2-RV64-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV64-NEXT: vmerge.vxm v12, v10, a2, v0 ; LMULMAX2-RV64-NEXT: lui a2, 66049 ; LMULMAX2-RV64-NEXT: addiw a2, a2, 32 ; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV64-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV64-NEXT: lui a2, %hi(.LCPI181_0) ; LMULMAX2-RV64-NEXT: addi a2, a2, %lo(.LCPI181_0) @@ -5030,19 +5030,19 @@ ; LMULMAX2-RV64-NEXT: lui a2, 8208 ; LMULMAX2-RV64-NEXT: addiw a2, a2, 513 ; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV64-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV64-NEXT: vmerge.vim v10, v10, 1, v0 ; LMULMAX2-RV64-NEXT: lui a2, 66785 ; LMULMAX2-RV64-NEXT: addiw a2, a2, 78 ; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV64-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV64-NEXT: vmerge.vim v10, v10, 3, v0 ; LMULMAX2-RV64-NEXT: lui a2, 529160 ; LMULMAX2-RV64-NEXT: addiw a2, a2, 304 ; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV64-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV64-NEXT: vmerge.vim v10, v10, 2, v0 ; LMULMAX2-RV64-NEXT: vsrl.vv v8, v8, v10 @@ -5075,32 +5075,26 @@ ; LMULMAX2-RV32-NEXT: vsetivli zero, 16, e16, m2, ta, ma ; LMULMAX2-RV32-NEXT: vle16.v v10, (a0) ; LMULMAX2-RV32-NEXT: li a1, 257 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a1 -; LMULMAX2-RV32-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV32-NEXT: vmv.v.i v12, 0 -; LMULMAX2-RV32-NEXT: lui a1, 1048568 -; LMULMAX2-RV32-NEXT: vmerge.vxm v14, v12, a1, v0 ; LMULMAX2-RV32-NEXT: lui a1, 4 ; LMULMAX2-RV32-NEXT: addi a1, a1, 64 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v8, a1 -; LMULMAX2-RV32-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; LMULMAX2-RV32-NEXT: vmv.s.x v8, a1 ; LMULMAX2-RV32-NEXT: lui a1, %hi(.LCPI182_0) ; LMULMAX2-RV32-NEXT: addi a1, a1, %lo(.LCPI182_0) -; LMULMAX2-RV32-NEXT: vle16.v v16, (a1) +; LMULMAX2-RV32-NEXT: vle16.v v14, (a1) +; LMULMAX2-RV32-NEXT: lui a1, 1048568 +; LMULMAX2-RV32-NEXT: vmerge.vxm v16, v12, a1, v0 ; LMULMAX2-RV32-NEXT: vmv1r.v v0, v8 ; LMULMAX2-RV32-NEXT: vmerge.vim v12, v12, 1, v0 ; LMULMAX2-RV32-NEXT: vsrl.vv v12, v10, v12 -; LMULMAX2-RV32-NEXT: vmulhu.vv v12, v12, v16 +; LMULMAX2-RV32-NEXT: vmulhu.vv v12, v12, v14 ; LMULMAX2-RV32-NEXT: vsub.vv v10, v10, v12 -; LMULMAX2-RV32-NEXT: vmulhu.vv v10, v10, v14 +; LMULMAX2-RV32-NEXT: vmulhu.vv v10, v10, v16 ; LMULMAX2-RV32-NEXT: vadd.vv v10, v10, v12 ; LMULMAX2-RV32-NEXT: lui a1, 2 ; LMULMAX2-RV32-NEXT: addi a1, a1, 289 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a1 -; LMULMAX2-RV32-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV32-NEXT: vmv.v.i v12, 3 ; LMULMAX2-RV32-NEXT: vmerge.vim v12, v12, 2, v0 ; LMULMAX2-RV32-NEXT: vmv1r.v v0, v8 @@ -5114,32 +5108,26 @@ ; LMULMAX2-RV64-NEXT: vsetivli zero, 16, e16, m2, ta, ma ; LMULMAX2-RV64-NEXT: vle16.v v10, (a0) ; LMULMAX2-RV64-NEXT: li a1, 257 -; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a1 -; LMULMAX2-RV64-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV64-NEXT: vmv.v.i v12, 0 -; LMULMAX2-RV64-NEXT: lui a1, 1048568 -; LMULMAX2-RV64-NEXT: vmerge.vxm v14, v12, a1, v0 ; LMULMAX2-RV64-NEXT: lui a1, 4 ; LMULMAX2-RV64-NEXT: addiw a1, a1, 64 -; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v8, a1 -; LMULMAX2-RV64-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; LMULMAX2-RV64-NEXT: vmv.s.x v8, a1 ; LMULMAX2-RV64-NEXT: lui a1, %hi(.LCPI182_0) ; LMULMAX2-RV64-NEXT: addi a1, a1, %lo(.LCPI182_0) -; LMULMAX2-RV64-NEXT: vle16.v v16, (a1) +; LMULMAX2-RV64-NEXT: vle16.v v14, (a1) +; LMULMAX2-RV64-NEXT: lui a1, 1048568 +; LMULMAX2-RV64-NEXT: vmerge.vxm v16, v12, a1, v0 ; LMULMAX2-RV64-NEXT: vmv1r.v v0, v8 ; LMULMAX2-RV64-NEXT: vmerge.vim v12, v12, 1, v0 ; LMULMAX2-RV64-NEXT: vsrl.vv v12, v10, v12 -; LMULMAX2-RV64-NEXT: vmulhu.vv v12, v12, v16 +; LMULMAX2-RV64-NEXT: vmulhu.vv v12, v12, v14 ; LMULMAX2-RV64-NEXT: vsub.vv v10, v10, v12 -; LMULMAX2-RV64-NEXT: vmulhu.vv v10, v10, v14 +; LMULMAX2-RV64-NEXT: vmulhu.vv v10, v10, v16 ; LMULMAX2-RV64-NEXT: vadd.vv v10, v10, v12 ; LMULMAX2-RV64-NEXT: lui a1, 2 ; LMULMAX2-RV64-NEXT: addiw a1, a1, 289 -; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a1 -; LMULMAX2-RV64-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV64-NEXT: vmv.v.i v12, 3 ; LMULMAX2-RV64-NEXT: vmerge.vim v12, v12, 2, v0 ; LMULMAX2-RV64-NEXT: vmv1r.v v0, v8 @@ -5174,9 +5162,7 @@ ; LMULMAX2-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-NEXT: vle32.v v8, (a0) ; LMULMAX2-NEXT: li a1, 68 -; LMULMAX2-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-NEXT: vmv.v.x v0, a1 -; LMULMAX2-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; LMULMAX2-NEXT: vmv.s.x v0, a1 ; LMULMAX2-NEXT: lui a1, %hi(.LCPI183_0) ; LMULMAX2-NEXT: addi a1, a1, %lo(.LCPI183_0) ; LMULMAX2-NEXT: vle32.v v10, (a1) @@ -5188,9 +5174,7 @@ ; LMULMAX2-NEXT: vmulhu.vv v8, v8, v12 ; LMULMAX2-NEXT: vadd.vv v8, v8, v10 ; LMULMAX2-NEXT: li a1, 136 -; LMULMAX2-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-NEXT: vmv.v.x v0, a1 -; LMULMAX2-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; LMULMAX2-NEXT: vmv.s.x v0, a1 ; LMULMAX2-NEXT: vmv.v.i v10, 2 ; LMULMAX2-NEXT: vmerge.vim v10, v10, 1, v0 ; LMULMAX2-NEXT: vsrl.vv v8, v8, v10 @@ -5387,7 +5371,7 @@ ; LMULMAX2-RV32-NEXT: lui a2, 304453 ; LMULMAX2-RV32-NEXT: addi a2, a2, -1452 ; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vim v10, v10, 1, v0 ; LMULMAX2-RV32-NEXT: li a1, -123 @@ -5408,7 +5392,7 @@ ; LMULMAX2-RV64-NEXT: lui a2, 304453 ; LMULMAX2-RV64-NEXT: addiw a2, a2, -1452 ; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV64-NEXT: vsetvli zero, a1, e8, m2, ta, ma ; LMULMAX2-RV64-NEXT: vmerge.vim v10, v10, 1, v0 ; LMULMAX2-RV64-NEXT: li a1, -123 @@ -5429,7 +5413,7 @@ ; LMULMAX1-RV32-NEXT: lui a2, 5 ; LMULMAX1-RV32-NEXT: addi a2, a2, -1452 ; LMULMAX1-RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX1-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX1-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX1-RV32-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; LMULMAX1-RV32-NEXT: vmv.v.i v10, -9 ; LMULMAX1-RV32-NEXT: vmerge.vim v10, v10, 9, v0 @@ -5448,7 +5432,7 @@ ; LMULMAX1-RV64-NEXT: lui a2, 5 ; LMULMAX1-RV64-NEXT: addiw a2, a2, -1452 ; LMULMAX1-RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX1-RV64-NEXT: vmv.v.x v0, a2 +; LMULMAX1-RV64-NEXT: vmv.s.x v0, a2 ; LMULMAX1-RV64-NEXT: vsetivli zero, 16, e8, m1, ta, ma ; LMULMAX1-RV64-NEXT: vmv.v.i v10, -9 ; LMULMAX1-RV64-NEXT: vmerge.vim v10, v10, 9, v0 @@ -5473,11 +5457,9 @@ ; LMULMAX2-RV32-NEXT: vmv.v.x v10, a1 ; LMULMAX2-RV32-NEXT: lui a1, 7 ; LMULMAX2-RV32-NEXT: addi a1, a1, -1687 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a1 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV32-NEXT: lui a1, 1048571 ; LMULMAX2-RV32-NEXT: addi a1, a1, 1755 -; LMULMAX2-RV32-NEXT: vsetivli zero, 16, e16, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vxm v10, v10, a1, v0 ; LMULMAX2-RV32-NEXT: vmulh.vv v8, v8, v10 ; LMULMAX2-RV32-NEXT: vsra.vi v8, v8, 1 @@ -5495,11 +5477,9 @@ ; LMULMAX2-RV64-NEXT: vmv.v.x v10, a1 ; LMULMAX2-RV64-NEXT: lui a1, 7 ; LMULMAX2-RV64-NEXT: addiw a1, a1, -1687 -; LMULMAX2-RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; LMULMAX2-RV64-NEXT: vmv.v.x v0, a1 +; LMULMAX2-RV64-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV64-NEXT: lui a1, 1048571 ; LMULMAX2-RV64-NEXT: addiw a1, a1, 1755 -; LMULMAX2-RV64-NEXT: vsetivli zero, 16, e16, m2, ta, ma ; LMULMAX2-RV64-NEXT: vmerge.vxm v10, v10, a1, v0 ; LMULMAX2-RV64-NEXT: vmulh.vv v8, v8, v10 ; LMULMAX2-RV64-NEXT: vsra.vi v8, v8, 1 @@ -5515,7 +5495,7 @@ ; LMULMAX1-NEXT: addi a1, a0, 16 ; LMULMAX1-NEXT: vle16.v v9, (a1) ; LMULMAX1-NEXT: li a2, 105 -; LMULMAX1-NEXT: vmv.v.x v0, a2 +; LMULMAX1-NEXT: vmv.s.x v0, a2 ; LMULMAX1-NEXT: vmv.v.i v10, 7 ; LMULMAX1-NEXT: vmerge.vim v10, v10, -7, v0 ; LMULMAX1-NEXT: vdiv.vv v9, v9, v10 @@ -5538,11 +5518,9 @@ ; LMULMAX2-RV32-NEXT: addi a1, a1, 1639 ; LMULMAX2-RV32-NEXT: vmv.v.x v10, a1 ; LMULMAX2-RV32-NEXT: li a1, 85 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a1 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV32-NEXT: lui a1, 629146 ; LMULMAX2-RV32-NEXT: addi a1, a1, -1639 -; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vxm v10, v10, a1, v0 ; LMULMAX2-RV32-NEXT: vmulh.vv v8, v8, v10 ; LMULMAX2-RV32-NEXT: vsrl.vi v10, v8, 31 @@ -5625,16 +5603,13 @@ ; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmv.v.x v10, a2 ; LMULMAX2-RV32-NEXT: li a2, 17 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a2 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a2 ; LMULMAX2-RV32-NEXT: addi a1, a1, 1366 -; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmerge.vxm v10, v10, a1, v0 ; LMULMAX2-RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmulh.vv v10, v8, v10 ; LMULMAX2-RV32-NEXT: li a1, 51 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a1 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmv.v.i v12, -1 ; LMULMAX2-RV32-NEXT: vmerge.vim v12, v12, 0, v0 @@ -5643,8 +5618,7 @@ ; LMULMAX2-RV32-NEXT: li a1, 63 ; LMULMAX2-RV32-NEXT: vsrl.vx v8, v12, a1 ; LMULMAX2-RV32-NEXT: li a1, 68 -; LMULMAX2-RV32-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; LMULMAX2-RV32-NEXT: vmv.v.x v0, a1 +; LMULMAX2-RV32-NEXT: vmv.s.x v0, a1 ; LMULMAX2-RV32-NEXT: vsetivli zero, 8, e32, m2, ta, ma ; LMULMAX2-RV32-NEXT: vmv.v.i v10, 0 ; LMULMAX2-RV32-NEXT: vmerge.vim v10, v10, 1, v0 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access-zve32x.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access-zve32x.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access-zve32x.ll @@ -21,7 +21,7 @@ ; ZVE32X-NEXT: vmv.s.x v8, a4 ; ZVE32X-NEXT: vand.vi v8, v8, 1 ; ZVE32X-NEXT: vmsne.vi v0, v8, 0 -; ZVE32X-NEXT: vmv.v.i v8, 0 +; ZVE32X-NEXT: vmv.s.x v8, zero ; ZVE32X-NEXT: vmerge.vim v9, v8, 1, v0 ; ZVE32X-NEXT: xor a0, a0, a7 ; ZVE32X-NEXT: snez a0, a0 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access.ll @@ -131,16 +131,16 @@ ; RV32-NEXT: addi sp, sp, -16 ; RV32-NEXT: .cfi_def_cfa_offset 16 ; RV32-NEXT: csrr a2, vlenb -; RV32-NEXT: li a3, 78 +; RV32-NEXT: li a3, 82 ; RV32-NEXT: mul a2, a2, a3 ; RV32-NEXT: sub sp, sp, a2 -; RV32-NEXT: .cfi_escape 0x0f, 0x0e, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0xce, 0x00, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 78 * vlenb +; RV32-NEXT: .cfi_escape 0x0f, 0x0e, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0xd2, 0x00, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 82 * vlenb ; RV32-NEXT: addi a3, a1, 256 ; RV32-NEXT: li a2, 32 ; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, ma ; RV32-NEXT: vle32.v v16, (a3) ; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a4, 53 +; RV32-NEXT: li a4, 57 ; RV32-NEXT: mul a3, a3, a4 ; RV32-NEXT: add a3, sp, a3 ; RV32-NEXT: addi a3, a3, 16 @@ -155,122 +155,150 @@ ; RV32-NEXT: vs4r.v v24, (a3) # Unknown-size Folded Spill ; RV32-NEXT: vadd.vi v8, v24, -4 ; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a4, 13 -; RV32-NEXT: mul a3, a3, a4 +; RV32-NEXT: slli a4, a3, 4 +; RV32-NEXT: add a3, a4, a3 ; RV32-NEXT: add a3, sp, a3 ; RV32-NEXT: addi a3, a3, 16 ; RV32-NEXT: vs4r.v v8, (a3) # Unknown-size Folded Spill -; RV32-NEXT: vrgather.vv v4, v16, v8 +; RV32-NEXT: vrgather.vv v12, v16, v8 ; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a4, 41 +; RV32-NEXT: li a4, 45 ; RV32-NEXT: mul a3, a3, a4 ; RV32-NEXT: add a3, sp, a3 ; RV32-NEXT: addi a3, a3, 16 -; RV32-NEXT: vs4r.v v4, (a3) # Unknown-size Folded Spill +; RV32-NEXT: vs4r.v v12, (a3) # Unknown-size Folded Spill ; RV32-NEXT: vadd.vi v8, v24, -10 ; RV32-NEXT: lui a3, 12 -; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a3 +; RV32-NEXT: vmv.s.x v0, a3 ; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a4, 29 -; RV32-NEXT: mul a3, a3, a4 +; RV32-NEXT: slli a4, a3, 5 +; RV32-NEXT: add a3, a4, a3 ; RV32-NEXT: add a3, sp, a3 ; RV32-NEXT: addi a3, a3, 16 ; RV32-NEXT: vs1r.v v0, (a3) # Unknown-size Folded Spill ; RV32-NEXT: vsetivli zero, 16, e32, m8, ta, ma ; RV32-NEXT: vslidedown.vi v16, v16, 16 ; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a4, 69 -; RV32-NEXT: mul a3, a3, a4 +; RV32-NEXT: slli a4, a3, 6 +; RV32-NEXT: add a3, a4, a3 ; RV32-NEXT: add a3, sp, a3 ; RV32-NEXT: addi a3, a3, 16 ; RV32-NEXT: vs8r.v v16, (a3) # Unknown-size Folded Spill ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu -; RV32-NEXT: vrgather.vv v4, v16, v8, v0.t -; RV32-NEXT: lui a3, %hi(.LCPI6_0) -; RV32-NEXT: addi a3, a3, %lo(.LCPI6_0) -; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, ma -; RV32-NEXT: vle32.v v24, (a3) -; RV32-NEXT: vle32.v v16, (a1) +; RV32-NEXT: vrgather.vv v12, v16, v8, v0.t ; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a4, 61 +; RV32-NEXT: li a4, 41 ; RV32-NEXT: mul a3, a3, a4 ; RV32-NEXT: add a3, sp, a3 ; RV32-NEXT: addi a3, a3, 16 -; RV32-NEXT: vs8r.v v16, (a3) # Unknown-size Folded Spill -; RV32-NEXT: addi a1, a1, 128 -; RV32-NEXT: vrgather.vv v8, v16, v24 -; RV32-NEXT: lui a3, %hi(.LCPI6_1) -; RV32-NEXT: addi a3, a3, %lo(.LCPI6_1) -; RV32-NEXT: lui a4, 1 -; RV32-NEXT: addi a4, a4, -64 -; RV32-NEXT: vle32.v v16, (a3) -; RV32-NEXT: csrr a3, vlenb -; RV32-NEXT: li a5, 21 -; RV32-NEXT: mul a3, a3, a5 -; RV32-NEXT: add a3, sp, a3 -; RV32-NEXT: addi a3, a3, 16 -; RV32-NEXT: vs8r.v v16, (a3) # Unknown-size Folded Spill +; RV32-NEXT: vs4r.v v12, (a3) # Unknown-size Folded Spill +; RV32-NEXT: addi a3, a1, 128 +; RV32-NEXT: lui a4, %hi(.LCPI6_0) +; RV32-NEXT: addi a4, a4, %lo(.LCPI6_0) +; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu +; RV32-NEXT: lui a5, %hi(.LCPI6_1) +; RV32-NEXT: addi a5, a5, %lo(.LCPI6_1) +; RV32-NEXT: lui a6, 1 +; RV32-NEXT: vle32.v v8, (a4) +; RV32-NEXT: csrr a4, vlenb +; RV32-NEXT: slli a7, a4, 3 +; RV32-NEXT: add a4, a7, a4 +; RV32-NEXT: add a4, sp, a4 +; RV32-NEXT: addi a4, a4, 16 +; RV32-NEXT: vs8r.v v8, (a4) # Unknown-size Folded Spill ; RV32-NEXT: vle32.v v16, (a1) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 45 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: li a4, 73 +; RV32-NEXT: mul a1, a1, a4 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a4 +; RV32-NEXT: vle32.v v8, (a5) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: slli a3, a1, 4 +; RV32-NEXT: li a4, 25 +; RV32-NEXT: mul a1, a1, a4 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill +; RV32-NEXT: vle32.v v8, (a3) +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: li a3, 49 +; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill +; RV32-NEXT: addi a1, a6, -64 +; RV32-NEXT: vmv.s.x v24, a1 +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a1, a1, 3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vs1r.v v24, (a1) # Unknown-size Folded Spill +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a3, a1, 3 ; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill -; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu +; RV32-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v24, v16, v0 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 21 +; RV32-NEXT: slli a1, a1, 3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vl1r.v v2, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vmv1r.v v0, v2 +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: li a3, 25 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v16, v24, v0.t +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v24, v8, v16, v0.t ; RV32-NEXT: vsetivli zero, 12, e32, m4, tu, ma -; RV32-NEXT: vmv.v.v v4, v8 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 21 +; RV32-NEXT: li a3, 41 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vs4r.v v4, (a1) # Unknown-size Folded Spill +; RV32-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vmv.v.v v8, v24 +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: li a3, 41 +; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu ; RV32-NEXT: csrr a1, vlenb ; RV32-NEXT: li a3, 37 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl4r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vadd.vi v8, v24, -2 +; RV32-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vadd.vi v16, v12, -2 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 53 +; RV32-NEXT: li a3, 57 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v4, v16, v8 -; RV32-NEXT: vadd.vi v8, v24, -8 +; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v8, v24, v16 +; RV32-NEXT: vadd.vi v16, v12, -8 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 29 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 5 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vmv1r.v v1, v0 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 69 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 6 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v4, v16, v8, v0.t +; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v8, v24, v16, v0.t +; RV32-NEXT: vmv.v.v v4, v8 ; RV32-NEXT: lui a1, %hi(.LCPI6_2) ; RV32-NEXT: addi a1, a1, %lo(.LCPI6_2) ; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu @@ -279,42 +307,37 @@ ; RV32-NEXT: vle32.v v16, (a1) ; RV32-NEXT: vle32.v v8, (a3) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: slli a3, a1, 2 -; RV32-NEXT: add a1, a3, a1 +; RV32-NEXT: li a3, 25 +; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 61 +; RV32-NEXT: li a3, 73 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v24, v16 -; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: slli a3, a1, 4 -; RV32-NEXT: add a1, a3, a1 -; RV32-NEXT: add a1, sp, a1 -; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v24, v8, v16 +; RV32-NEXT: vmv1r.v v0, v2 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 45 +; RV32-NEXT: li a3, 49 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: slli a3, a1, 2 -; RV32-NEXT: add a1, a3, a1 +; RV32-NEXT: li a3, 25 +; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v24, v16, v0.t +; RV32-NEXT: vrgather.vv v24, v8, v16, v0.t ; RV32-NEXT: vsetivli zero, 12, e32, m4, tu, ma -; RV32-NEXT: vmv.v.v v4, v8 +; RV32-NEXT: vmv.v.v v4, v24 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: slli a3, a1, 4 -; RV32-NEXT: add a1, a3, a1 +; RV32-NEXT: li a3, 25 +; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs4r.v v4, (a1) # Unknown-size Folded Spill @@ -323,12 +346,12 @@ ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu ; RV32-NEXT: vle32.v v8, (a1) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 53 +; RV32-NEXT: li a3, 57 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v12, v0, v8 +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v12, v16, v8 ; RV32-NEXT: csrr a1, vlenb ; RV32-NEXT: li a3, 37 ; RV32-NEXT: mul a1, a1, a3 @@ -337,87 +360,104 @@ ; RV32-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vadd.vi v8, v8, -6 ; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a3, a1, 3 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill +; RV32-NEXT: vmv1r.v v0, v1 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 29 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 6 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl1r.v v1, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vmv1r.v v0, v1 +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v12, v16, v8, v0.t ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 69 +; RV32-NEXT: li a3, 37 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v12, v16, v8, v0.t -; RV32-NEXT: vmv.v.v v4, v12 +; RV32-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill ; RV32-NEXT: lui a1, %hi(.LCPI6_5) ; RV32-NEXT: addi a1, a1, %lo(.LCPI6_5) -; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, ma +; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu +; RV32-NEXT: lui a3, %hi(.LCPI6_6) +; RV32-NEXT: addi a3, a3, %lo(.LCPI6_6) ; RV32-NEXT: vle32.v v16, (a1) +; RV32-NEXT: vle32.v v8, (a3) +; RV32-NEXT: addi a1, sp, 16 +; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill +; RV32-NEXT: li a1, 960 +; RV32-NEXT: vmv.s.x v0, a1 +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a1, a1, 3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 61 +; RV32-NEXT: li a3, 73 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vrgather.vv v8, v24, v16 -; RV32-NEXT: lui a1, %hi(.LCPI6_6) -; RV32-NEXT: addi a1, a1, %lo(.LCPI6_6) -; RV32-NEXT: li a3, 960 -; RV32-NEXT: vle32.v v24, (a1) -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a3 -; RV32-NEXT: addi a1, sp, 16 -; RV32-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill -; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 45 +; RV32-NEXT: li a3, 49 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV32-NEXT: addi a1, sp, 16 +; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vrgather.vv v8, v16, v24, v0.t ; RV32-NEXT: vsetivli zero, 10, e32, m4, tu, ma -; RV32-NEXT: vmv.v.v v4, v8 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: slli a3, a1, 2 -; RV32-NEXT: add a1, a3, a1 +; RV32-NEXT: li a3, 37 +; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vs4r.v v4, (a1) # Unknown-size Folded Spill +; RV32-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vmv.v.v v12, v8 +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: li a3, 37 +; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill ; RV32-NEXT: lui a1, %hi(.LCPI6_7) ; RV32-NEXT: addi a1, a1, %lo(.LCPI6_7) ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu ; RV32-NEXT: vle32.v v8, (a1) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 53 +; RV32-NEXT: li a3, 57 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vrgather.vv v12, v24, v8 -; RV32-NEXT: vmv1r.v v0, v1 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 13 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 5 +; RV32-NEXT: add a1, a3, a1 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 +; RV32-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a3, a1, 4 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 69 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 6 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vrgather.vv v12, v24, v8, v0.t ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 37 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 5 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill @@ -426,130 +466,132 @@ ; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu ; RV32-NEXT: lui a3, %hi(.LCPI6_9) ; RV32-NEXT: addi a3, a3, %lo(.LCPI6_9) -; RV32-NEXT: vle32.v v0, (a1) +; RV32-NEXT: vle32.v v24, (a1) ; RV32-NEXT: vle32.v v8, (a3) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 29 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 4 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 61 +; RV32-NEXT: li a3, 73 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v24, v0 -; RV32-NEXT: addi a1, sp, 16 +; RV32-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v8, v0, v24 +; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a1, a1, 3 +; RV32-NEXT: add a1, sp, a1 +; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 29 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 4 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vrgather.vv v8, v16, v24, v0.t ; RV32-NEXT: vsetivli zero, 10, e32, m4, tu, ma ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 37 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 5 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vmv.v.v v12, v8 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 37 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 5 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill -; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; RV32-NEXT: lui a1, %hi(.LCPI6_10) +; RV32-NEXT: addi a1, a1, %lo(.LCPI6_10) +; RV32-NEXT: vle32.v v8, (a1) +; RV32-NEXT: lui a1, 15 +; RV32-NEXT: vmv.s.x v1, a1 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 53 +; RV32-NEXT: li a3, 57 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb +; RV32-NEXT: slli a3, a1, 3 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v4, v8, v12 -; RV32-NEXT: lui a1, %hi(.LCPI6_10) -; RV32-NEXT: addi a1, a1, %lo(.LCPI6_10) -; RV32-NEXT: lui a3, 15 -; RV32-NEXT: vle32.v v8, (a1) -; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v2, a3 -; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu -; RV32-NEXT: vmv1r.v v0, v2 +; RV32-NEXT: vrgather.vv v4, v16, v12 +; RV32-NEXT: vmv1r.v v0, v1 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 69 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 6 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vrgather.vv v4, v16, v8, v0.t ; RV32-NEXT: lui a1, %hi(.LCPI6_11) ; RV32-NEXT: addi a1, a1, %lo(.LCPI6_11) -; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, ma -; RV32-NEXT: vle32.v v16, (a1) +; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu +; RV32-NEXT: lui a3, %hi(.LCPI6_12) +; RV32-NEXT: addi a3, a3, %lo(.LCPI6_12) +; RV32-NEXT: vle32.v v24, (a1) +; RV32-NEXT: vle32.v v8, (a3) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 61 +; RV32-NEXT: li a3, 57 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v24, v16 -; RV32-NEXT: lui a1, %hi(.LCPI6_12) -; RV32-NEXT: addi a1, a1, %lo(.LCPI6_12) -; RV32-NEXT: li a3, 1008 -; RV32-NEXT: vle32.v v16, (a1) -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a3 +; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill +; RV32-NEXT: li a1, 1008 +; RV32-NEXT: vmv.s.x v2, a1 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 53 +; RV32-NEXT: li a3, 73 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill -; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v8, v16, v24 +; RV32-NEXT: vmv1r.v v0, v2 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 45 +; RV32-NEXT: li a3, 49 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v24, v16, v0.t -; RV32-NEXT: vsetivli zero, 10, e32, m4, tu, ma -; RV32-NEXT: vmv.v.v v4, v8 +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 29 +; RV32-NEXT: li a3, 57 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vs4r.v v4, (a1) # Unknown-size Folded Spill +; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v8, v16, v24, v0.t +; RV32-NEXT: vsetivli zero, 10, e32, m4, tu, ma +; RV32-NEXT: vmv.v.v v4, v8 ; RV32-NEXT: lui a1, %hi(.LCPI6_13) ; RV32-NEXT: addi a1, a1, %lo(.LCPI6_13) ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, mu ; RV32-NEXT: vle32.v v8, (a1) -; RV32-NEXT: vmv1r.v v0, v2 +; RV32-NEXT: vmv1r.v v0, v1 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 69 +; RV32-NEXT: li a3, 45 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 41 -; RV32-NEXT: mul a1, a1, a3 +; RV32-NEXT: slli a3, a1, 6 +; RV32-NEXT: add a1, a3, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v12, v24, v8, v0.t +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v12, v16, v8, v0.t ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a3, 41 +; RV32-NEXT: li a3, 45 ; RV32-NEXT: mul a1, a1, a3 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 @@ -559,43 +601,38 @@ ; RV32-NEXT: vsetvli zero, a2, e32, m8, ta, mu ; RV32-NEXT: lui a2, %hi(.LCPI6_15) ; RV32-NEXT: addi a2, a2, %lo(.LCPI6_15) -; RV32-NEXT: vle32.v v24, (a1) +; RV32-NEXT: vle32.v v16, (a1) ; RV32-NEXT: vle32.v v8, (a2) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 69 -; RV32-NEXT: mul a1, a1, a2 +; RV32-NEXT: slli a2, a1, 6 +; RV32-NEXT: add a1, a2, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 61 +; RV32-NEXT: li a2, 73 ; RV32-NEXT: mul a1, a1, a2 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v0, v24 +; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vrgather.vv v8, v24, v16 +; RV32-NEXT: vmv1r.v v0, v2 ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 53 +; RV32-NEXT: li a2, 49 ; RV32-NEXT: mul a1, a1, a2 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 45 -; RV32-NEXT: mul a1, a1, a2 +; RV32-NEXT: slli a2, a1, 6 +; RV32-NEXT: add a1, a2, a1 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 69 -; RV32-NEXT: mul a1, a1, a2 -; RV32-NEXT: add a1, sp, a1 -; RV32-NEXT: addi a1, a1, 16 -; RV32-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV32-NEXT: vrgather.vv v8, v24, v16, v0.t +; RV32-NEXT: vrgather.vv v8, v16, v24, v0.t ; RV32-NEXT: vsetivli zero, 10, e32, m4, tu, ma ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 41 +; RV32-NEXT: li a2, 45 ; RV32-NEXT: mul a1, a1, a2 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 @@ -605,46 +642,40 @@ ; RV32-NEXT: vsetivli zero, 16, e32, m4, ta, ma ; RV32-NEXT: vse32.v v12, (a1) ; RV32-NEXT: addi a1, a0, 256 -; RV32-NEXT: csrr a2, vlenb -; RV32-NEXT: li a3, 29 -; RV32-NEXT: mul a2, a2, a3 -; RV32-NEXT: add a2, sp, a2 -; RV32-NEXT: addi a2, a2, 16 -; RV32-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload -; RV32-NEXT: vse32.v v8, (a1) +; RV32-NEXT: vse32.v v4, (a1) ; RV32-NEXT: addi a1, a0, 192 ; RV32-NEXT: csrr a2, vlenb -; RV32-NEXT: li a3, 37 -; RV32-NEXT: mul a2, a2, a3 +; RV32-NEXT: slli a3, a2, 5 +; RV32-NEXT: add a2, a3, a2 ; RV32-NEXT: add a2, sp, a2 ; RV32-NEXT: addi a2, a2, 16 ; RV32-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload ; RV32-NEXT: vse32.v v8, (a1) ; RV32-NEXT: addi a1, a0, 128 ; RV32-NEXT: csrr a2, vlenb -; RV32-NEXT: slli a3, a2, 2 -; RV32-NEXT: add a2, a3, a2 +; RV32-NEXT: li a3, 37 +; RV32-NEXT: mul a2, a2, a3 ; RV32-NEXT: add a2, sp, a2 ; RV32-NEXT: addi a2, a2, 16 ; RV32-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload ; RV32-NEXT: vse32.v v8, (a1) ; RV32-NEXT: addi a1, a0, 64 ; RV32-NEXT: csrr a2, vlenb -; RV32-NEXT: slli a3, a2, 4 -; RV32-NEXT: add a2, a3, a2 +; RV32-NEXT: li a3, 25 +; RV32-NEXT: mul a2, a2, a3 ; RV32-NEXT: add a2, sp, a2 ; RV32-NEXT: addi a2, a2, 16 ; RV32-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload ; RV32-NEXT: vse32.v v8, (a1) ; RV32-NEXT: csrr a1, vlenb -; RV32-NEXT: li a2, 21 +; RV32-NEXT: li a2, 41 ; RV32-NEXT: mul a1, a1, a2 ; RV32-NEXT: add a1, sp, a1 ; RV32-NEXT: addi a1, a1, 16 ; RV32-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload ; RV32-NEXT: vse32.v v8, (a0) ; RV32-NEXT: csrr a0, vlenb -; RV32-NEXT: li a1, 78 +; RV32-NEXT: li a1, 82 ; RV32-NEXT: mul a0, a0, a1 ; RV32-NEXT: add sp, sp, a0 ; RV32-NEXT: addi sp, sp, 16 @@ -655,15 +686,15 @@ ; RV64-NEXT: addi sp, sp, -16 ; RV64-NEXT: .cfi_def_cfa_offset 16 ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 90 +; RV64-NEXT: li a3, 84 ; RV64-NEXT: mul a2, a2, a3 ; RV64-NEXT: sub sp, sp, a2 -; RV64-NEXT: .cfi_escape 0x0f, 0x0e, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0xda, 0x00, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 90 * vlenb +; RV64-NEXT: .cfi_escape 0x0f, 0x0e, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0xd4, 0x00, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 84 * vlenb ; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, ma ; RV64-NEXT: addi a2, a1, 256 ; RV64-NEXT: vle64.v v16, (a2) ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 57 +; RV64-NEXT: li a3, 52 ; RV64-NEXT: mul a2, a2, a3 ; RV64-NEXT: add a2, sp, a2 ; RV64-NEXT: addi a2, a2, 16 @@ -671,14 +702,14 @@ ; RV64-NEXT: addi a2, a1, 128 ; RV64-NEXT: vle64.v v8, (a2) ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: slli a3, a2, 6 -; RV64-NEXT: add a2, a3, a2 +; RV64-NEXT: li a3, 60 +; RV64-NEXT: mul a2, a2, a3 ; RV64-NEXT: add a2, sp, a2 ; RV64-NEXT: addi a2, a2, 16 ; RV64-NEXT: vs8r.v v8, (a2) # Unknown-size Folded Spill ; RV64-NEXT: vle64.v v8, (a1) ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 73 +; RV64-NEXT: li a2, 68 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 @@ -686,182 +717,181 @@ ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma ; RV64-NEXT: vrgather.vi v8, v16, 4 ; RV64-NEXT: li a1, 128 -; RV64-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV64-NEXT: vmv.v.x v1, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: vsetivli zero, 8, e64, m8, ta, ma ; RV64-NEXT: vslidedown.vi v24, v16, 8 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 49 +; RV64-NEXT: li a2, 44 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu -; RV64-NEXT: vmv1r.v v0, v1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs1r.v v1, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vrgather.vi v8, v24, 2, v0.t -; RV64-NEXT: vmv.v.v v4, v8 -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, ma +; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: li a2, 40 +; RV64-NEXT: mul a1, a1, a2 +; RV64-NEXT: add a1, sp, a1 +; RV64-NEXT: addi a1, a1, 16 +; RV64-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu ; RV64-NEXT: li a1, 6 ; RV64-NEXT: vid.v v8 -; RV64-NEXT: vmul.vx v16, v8, a1 +; RV64-NEXT: vmul.vx v24, v8, a1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 76 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill ; RV64-NEXT: li a1, 56 -; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 73 -; RV64-NEXT: mul a2, a2, a3 -; RV64-NEXT: add a2, sp, a2 -; RV64-NEXT: addi a2, a2, 16 -; RV64-NEXT: vl8r.v v8, (a2) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v24, v8, v16 -; RV64-NEXT: vadd.vi v8, v16, -16 -; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 41 -; RV64-NEXT: mul a2, a2, a3 -; RV64-NEXT: add a2, sp, a2 -; RV64-NEXT: addi a2, a2, 16 -; RV64-NEXT: vs8r.v v8, (a2) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v0, a1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 25 +; RV64-NEXT: li a2, 20 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 6 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 68 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vv v16, v8, v24 +; RV64-NEXT: vadd.vi v8, v24, -16 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 41 +; RV64-NEXT: slli a1, a1, 5 +; RV64-NEXT: add a1, sp, a1 +; RV64-NEXT: addi a1, a1, 16 +; RV64-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill +; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: li a2, 60 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v24, v8, v16, v0.t +; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: slli a1, a1, 5 +; RV64-NEXT: add a1, sp, a1 +; RV64-NEXT: addi a1, a1, 16 +; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vv v16, v8, v24, v0.t ; RV64-NEXT: vsetivli zero, 6, e64, m4, tu, ma -; RV64-NEXT: vmv.v.v v4, v24 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 29 +; RV64-NEXT: li a2, 40 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs4r.v v4, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; RV64-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vmv.v.v v8, v16 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 57 +; RV64-NEXT: li a2, 40 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vi v16, v8, 5 -; RV64-NEXT: vmv1r.v v0, v1 +; RV64-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 49 +; RV64-NEXT: li a2, 52 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vi v16, v8, 3, v0.t +; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vi v8, v16, 5 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 41 +; RV64-NEXT: li a2, 24 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs4r.v v16, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu +; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 44 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vadd.vi v0, v16, 1 +; RV64-NEXT: vrgather.vi v8, v16, 3, v0.t ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 73 -; RV64-NEXT: mul a1, a1, a2 +; RV64-NEXT: slli a1, a1, 5 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v24, v8, v0 -; RV64-NEXT: vadd.vi v8, v16, -15 +; RV64-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 4 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 76 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vadd.vi v0, v16, 1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 25 +; RV64-NEXT: li a2, 68 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vv v8, v24, v0 +; RV64-NEXT: vadd.vi v24, v16, -15 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 6 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 20 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 4 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 60 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v24, v8, v16, v0.t +; RV64-NEXT: vrgather.vv v8, v16, v24, v0.t ; RV64-NEXT: vsetivli zero, 6, e64, m4, tu, ma ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 41 -; RV64-NEXT: mul a1, a1, a2 +; RV64-NEXT: slli a1, a1, 5 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vmv.v.v v8, v24 +; RV64-NEXT: vl4r.v v12, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vmv.v.v v12, v8 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 41 +; RV64-NEXT: slli a1, a1, 5 +; RV64-NEXT: add a1, sp, a1 +; RV64-NEXT: addi a1, a1, 16 +; RV64-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu +; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: li a2, 76 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, ma +; RV64-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vadd.vi v8, v0, 2 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 68 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vadd.vi v8, v24, 2 +; RV64-NEXT: vrgather.vv v16, v24, v8 +; RV64-NEXT: li a1, 24 +; RV64-NEXT: vmv.s.x v24, a1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 73 +; RV64-NEXT: li a2, 12 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v16, v0, v8 -; RV64-NEXT: li a1, 24 -; RV64-NEXT: vadd.vi v8, v24, -14 -; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v2, a1 -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu -; RV64-NEXT: vmv1r.v v0, v2 +; RV64-NEXT: vs1r.v v24, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vadd.vi v8, v0, -14 +; RV64-NEXT: vmv1r.v v0, v24 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 6 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 60 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload @@ -869,31 +899,31 @@ ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma ; RV64-NEXT: vmv.v.i v8, 6 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 2 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: slli a1, a1, 4 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs4r.v v8, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vmv.s.x v4, zero +; RV64-NEXT: vmv.s.x v12, zero ; RV64-NEXT: vsetivli zero, 6, e64, m4, tu, ma -; RV64-NEXT: vslideup.vi v8, v4, 5 +; RV64-NEXT: addi a1, sp, 16 +; RV64-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vslideup.vi v8, v12, 5 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 57 +; RV64-NEXT: li a2, 52 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vrgather.vv v12, v24, v8 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl1r.v v1, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vmv1r.v v0, v1 +; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 49 +; RV64-NEXT: li a2, 44 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 @@ -902,75 +932,73 @@ ; RV64-NEXT: vsetivli zero, 5, e64, m4, tu, ma ; RV64-NEXT: vmv.v.v v12, v16 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 25 +; RV64-NEXT: li a2, 20 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 76 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vadd.vi v16, v8, 3 +; RV64-NEXT: vadd.vi v0, v8, 3 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 73 +; RV64-NEXT: li a2, 68 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v8, v24, v16 -; RV64-NEXT: vmv.v.v v24, v8 +; RV64-NEXT: vrgather.vv v16, v24, v0 +; RV64-NEXT: vadd.vi v8, v8, -13 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 12 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vadd.vi v8, v8, -13 -; RV64-NEXT: vmv1r.v v0, v2 +; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 6 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 60 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v24, v16, v8, v0.t +; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vv v16, v24, v8, v0.t ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 3 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: slli a1, a1, 2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma ; RV64-NEXT: vmv.v.i v12, 7 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 4 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 12 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vsetivli zero, 8, e64, m1, ta, ma -; RV64-NEXT: vmv.v.i v16, 1 +; RV64-NEXT: vmv.v.i v4, 1 ; RV64-NEXT: vsetivli zero, 6, e64, m4, tu, ma -; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: add a1, sp, a1 -; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs4r.v v16, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vslideup.vi v12, v16, 5 +; RV64-NEXT: vslideup.vi v12, v4, 5 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 57 +; RV64-NEXT: li a2, 52 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vrgather.vv v16, v24, v12 -; RV64-NEXT: vmv1r.v v0, v1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 49 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 +; RV64-NEXT: add a1, sp, a1 +; RV64-NEXT: addi a1, a1, 16 +; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: li a2, 44 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 @@ -978,178 +1006,163 @@ ; RV64-NEXT: vrgather.vi v16, v8, 5, v0.t ; RV64-NEXT: vsetivli zero, 5, e64, m4, tu, ma ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 3 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: slli a1, a1, 2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vmv.v.v v16, v8 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 3 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: slli a1, a1, 2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs4r.v v16, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, ma +; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 76 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vadd.vi v8, v8, 4 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 73 +; RV64-NEXT: li a2, 68 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vrgather.vv v16, v24, v8 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill ; RV64-NEXT: li a1, 28 -; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 81 -; RV64-NEXT: mul a2, a2, a3 -; RV64-NEXT: add a2, sp, a2 -; RV64-NEXT: addi a2, a2, 16 -; RV64-NEXT: vl8r.v v8, (a2) # Unknown-size Folded Reload +; RV64-NEXT: vmv.s.x v1, a1 +; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: li a2, 76 +; RV64-NEXT: mul a1, a1, a2 +; RV64-NEXT: add a1, sp, a1 +; RV64-NEXT: addi a1, a1, 16 +; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vadd.vi v16, v8, -12 -; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 -; RV64-NEXT: addi a1, sp, 16 -; RV64-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu +; RV64-NEXT: vmv1r.v v0, v1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 6 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 60 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vrgather.vv v8, v24, v16, v0.t ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vsetivli zero, 7, e64, m4, tu, ma +; RV64-NEXT: addi a1, sp, 16 +; RV64-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 2 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: slli a1, a1, 4 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl4r.v v24, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vslideup.vi v24, v4, 6 -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; RV64-NEXT: vslideup.vi v24, v8, 6 +; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: li a1, 192 -; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 57 -; RV64-NEXT: mul a2, a2, a3 -; RV64-NEXT: add a2, sp, a2 -; RV64-NEXT: addi a2, a2, 16 -; RV64-NEXT: vl8r.v v8, (a2) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vi v28, v8, 2 -; RV64-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV64-NEXT: vmv.v.x v0, a1 +; RV64-NEXT: vmv.s.x v2, a1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 2 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 52 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs1r.v v0, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vi v16, v8, 2 +; RV64-NEXT: vmv1r.v v0, v2 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 49 +; RV64-NEXT: li a2, 44 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vmv4r.v v12, v28 +; RV64-NEXT: vmv.v.v v12, v16 ; RV64-NEXT: vrgather.vv v12, v8, v24, v0.t ; RV64-NEXT: vsetivli zero, 5, e64, m4, tu, ma ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vmv.v.v v12, v24 +; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vmv.v.v v12, v16 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 5 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 24 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vs4r.v v12, (a1) # Unknown-size Folded Spill ; RV64-NEXT: vsetivli zero, 16, e64, m8, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 76 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl8r.v v0, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vadd.vi v24, v0, 5 +; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vadd.vi v16, v8, 5 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 73 +; RV64-NEXT: li a2, 68 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v16, v8, v24 -; RV64-NEXT: vadd.vi v24, v0, -11 -; RV64-NEXT: addi a1, sp, 16 -; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vv v24, v8, v16 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 6 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 76 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vrgather.vv v16, v8, v24, v0.t +; RV64-NEXT: vadd.vi v16, v8, -11 +; RV64-NEXT: vmv1r.v v0, v1 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 60 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill -; RV64-NEXT: vsetivli zero, 7, e64, m4, tu, ma +; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vrgather.vv v24, v8, v16, v0.t ; RV64-NEXT: csrr a1, vlenb +; RV64-NEXT: li a2, 76 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload +; RV64-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill +; RV64-NEXT: vsetivli zero, 7, e64, m4, tu, ma ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 4 -; RV64-NEXT: add a1, a2, a1 +; RV64-NEXT: li a2, 12 +; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl4r.v v24, (a1) # Unknown-size Folded Reload -; RV64-NEXT: vslideup.vi v24, v8, 6 +; RV64-NEXT: vslideup.vi v24, v4, 6 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, mu ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 57 +; RV64-NEXT: li a2, 52 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vrgather.vi v12, v8, 3 +; RV64-NEXT: vmv1r.v v0, v2 ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: slli a2, a1, 2 -; RV64-NEXT: add a1, a2, a1 -; RV64-NEXT: add a1, sp, a1 -; RV64-NEXT: addi a1, a1, 16 -; RV64-NEXT: vl1r.v v0, (a1) # Unknown-size Folded Reload -; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 49 +; RV64-NEXT: li a2, 44 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 @@ -1157,7 +1170,7 @@ ; RV64-NEXT: vrgather.vv v12, v16, v24, v0.t ; RV64-NEXT: vsetivli zero, 5, e64, m4, tu, ma ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 81 +; RV64-NEXT: li a2, 76 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 @@ -1168,23 +1181,22 @@ ; RV64-NEXT: vse64.v v12, (a1) ; RV64-NEXT: addi a1, a0, 256 ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: slli a3, a2, 5 -; RV64-NEXT: add a2, a3, a2 +; RV64-NEXT: li a3, 24 +; RV64-NEXT: mul a2, a2, a3 ; RV64-NEXT: add a2, sp, a2 ; RV64-NEXT: addi a2, a2, 16 ; RV64-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload ; RV64-NEXT: vse64.v v8, (a1) ; RV64-NEXT: addi a1, a0, 192 ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: slli a3, a2, 3 -; RV64-NEXT: add a2, a3, a2 +; RV64-NEXT: slli a2, a2, 2 ; RV64-NEXT: add a2, sp, a2 ; RV64-NEXT: addi a2, a2, 16 ; RV64-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload ; RV64-NEXT: vse64.v v8, (a1) ; RV64-NEXT: addi a1, a0, 128 ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 25 +; RV64-NEXT: li a3, 20 ; RV64-NEXT: mul a2, a2, a3 ; RV64-NEXT: add a2, sp, a2 ; RV64-NEXT: addi a2, a2, 16 @@ -1192,21 +1204,20 @@ ; RV64-NEXT: vse64.v v8, (a1) ; RV64-NEXT: addi a1, a0, 64 ; RV64-NEXT: csrr a2, vlenb -; RV64-NEXT: li a3, 41 -; RV64-NEXT: mul a2, a2, a3 +; RV64-NEXT: slli a2, a2, 5 ; RV64-NEXT: add a2, sp, a2 ; RV64-NEXT: addi a2, a2, 16 ; RV64-NEXT: vl4r.v v8, (a2) # Unknown-size Folded Reload ; RV64-NEXT: vse64.v v8, (a1) ; RV64-NEXT: csrr a1, vlenb -; RV64-NEXT: li a2, 29 +; RV64-NEXT: li a2, 40 ; RV64-NEXT: mul a1, a1, a2 ; RV64-NEXT: add a1, sp, a1 ; RV64-NEXT: addi a1, a1, 16 ; RV64-NEXT: vl4r.v v8, (a1) # Unknown-size Folded Reload ; RV64-NEXT: vse64.v v8, (a0) ; RV64-NEXT: csrr a0, vlenb -; RV64-NEXT: li a1, 90 +; RV64-NEXT: li a1, 84 ; RV64-NEXT: mul a0, a0, a1 ; RV64-NEXT: add sp, sp, a0 ; RV64-NEXT: addi sp, sp, 16 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-buildvec.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-buildvec.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-buildvec.ll @@ -16,7 +16,7 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: andi a0, a0, 1 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v8, a0 +; CHECK-NEXT: vmv.s.x v8, a0 ; CHECK-NEXT: vmsne.vi v0, v8, 0 ; CHECK-NEXT: ret ; @@ -24,7 +24,7 @@ ; ZVE32F: # %bb.0: ; ZVE32F-NEXT: andi a0, a0, 1 ; ZVE32F-NEXT: vsetivli zero, 1, e8, mf4, ta, ma -; ZVE32F-NEXT: vmv.v.x v8, a0 +; ZVE32F-NEXT: vmv.s.x v8, a0 ; ZVE32F-NEXT: vmsne.vi v0, v8, 0 ; ZVE32F-NEXT: ret %1 = insertelement <1 x i1> poison, i1 %x, i32 0 @@ -36,7 +36,7 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: andi a0, a0, 1 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v8, a0 +; CHECK-NEXT: vmv.s.x v8, a0 ; CHECK-NEXT: vmsne.vi v0, v8, 0 ; CHECK-NEXT: ret ; @@ -44,7 +44,7 @@ ; ZVE32F: # %bb.0: ; ZVE32F-NEXT: andi a0, a0, 1 ; ZVE32F-NEXT: vsetivli zero, 1, e8, mf4, ta, ma -; ZVE32F-NEXT: vmv.v.x v8, a0 +; ZVE32F-NEXT: vmv.s.x v8, a0 ; ZVE32F-NEXT: vmsne.vi v0, v8, 0 ; ZVE32F-NEXT: ret %1 = insertelement <1 x i1> poison, i1 %x, i32 0 @@ -236,14 +236,14 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: li a0, 182 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: ret ; ; ZVE32F-LABEL: buildvec_mask_v8i1: ; ZVE32F: # %bb.0: ; ZVE32F-NEXT: li a0, 182 ; ZVE32F-NEXT: vsetivli zero, 1, e8, mf4, ta, ma -; ZVE32F-NEXT: vmv.v.x v0, a0 +; ZVE32F-NEXT: vmv.s.x v0, a0 ; ZVE32F-NEXT: ret ret <8 x i1> } @@ -253,7 +253,7 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma ; CHECK-NEXT: li a2, 19 -; CHECK-NEXT: vmv.v.x v0, a2 +; CHECK-NEXT: vmv.s.x v0, a2 ; CHECK-NEXT: vmv.v.x v8, a1 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0 ; CHECK-NEXT: vand.vi v8, v8, 1 @@ -264,7 +264,7 @@ ; ZVE32F: # %bb.0: ; ZVE32F-NEXT: vsetivli zero, 8, e8, mf2, ta, ma ; ZVE32F-NEXT: li a2, 19 -; ZVE32F-NEXT: vmv.v.x v0, a2 +; ZVE32F-NEXT: vmv.s.x v0, a2 ; ZVE32F-NEXT: vmv.v.x v8, a1 ; ZVE32F-NEXT: vmerge.vxm v8, v8, a0, v0 ; ZVE32F-NEXT: vand.vi v8, v8, 1 @@ -413,14 +413,14 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: li a0, 949 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: ret ; ; ZVE32F-LABEL: buildvec_mask_v10i1: ; ZVE32F: # %bb.0: ; ZVE32F-NEXT: li a0, 949 ; ZVE32F-NEXT: vsetivli zero, 1, e16, mf2, ta, ma -; ZVE32F-NEXT: vmv.v.x v0, a0 +; ZVE32F-NEXT: vmv.s.x v0, a0 ; ZVE32F-NEXT: ret ret <10 x i1> } @@ -431,7 +431,7 @@ ; CHECK-RV32-NEXT: lui a0, 11 ; CHECK-RV32-NEXT: addi a0, a0, 1718 ; CHECK-RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-RV32-NEXT: vmv.v.x v0, a0 +; CHECK-RV32-NEXT: vmv.s.x v0, a0 ; CHECK-RV32-NEXT: ret ; ; CHECK-RV64-LABEL: buildvec_mask_v16i1: @@ -439,7 +439,7 @@ ; CHECK-RV64-NEXT: lui a0, 11 ; CHECK-RV64-NEXT: addiw a0, a0, 1718 ; CHECK-RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-RV64-NEXT: vmv.v.x v0, a0 +; CHECK-RV64-NEXT: vmv.s.x v0, a0 ; CHECK-RV64-NEXT: ret ret <16 x i1> } @@ -449,14 +449,14 @@ ; CHECK: # %bb.0: ; CHECK-NEXT: li a0, 1722 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: ret ; ; ZVE32F-LABEL: buildvec_mask_v16i1_undefs: ; ZVE32F: # %bb.0: ; ZVE32F-NEXT: li a0, 1722 ; ZVE32F-NEXT: vsetivli zero, 1, e16, mf2, ta, ma -; ZVE32F-NEXT: vmv.v.x v0, a0 +; ZVE32F-NEXT: vmv.s.x v0, a0 ; ZVE32F-NEXT: ret ret <16 x i1> } @@ -466,20 +466,20 @@ ; RV32-LMULMAX1: # %bb.0: ; RV32-LMULMAX1-NEXT: li a0, 1776 ; RV32-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX1-NEXT: lui a0, 11 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1718 -; RV32-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX1-NEXT: ret ; ; RV64-LMULMAX1-LABEL: buildvec_mask_v32i1: ; RV64-LMULMAX1: # %bb.0: ; RV64-LMULMAX1-NEXT: li a0, 1776 ; RV64-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX1-NEXT: lui a0, 11 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1718 -; RV64-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX1-NEXT: ret ; ; RV32-LMULMAX2-LABEL: buildvec_mask_v32i1: @@ -487,7 +487,7 @@ ; RV32-LMULMAX2-NEXT: lui a0, 748384 ; RV32-LMULMAX2-NEXT: addi a0, a0, 1776 ; RV32-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX2-NEXT: ret ; ; RV64-LMULMAX2-LABEL: buildvec_mask_v32i1: @@ -495,7 +495,7 @@ ; RV64-LMULMAX2-NEXT: lui a0, 748384 ; RV64-LMULMAX2-NEXT: addiw a0, a0, 1776 ; RV64-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX2-NEXT: ret ; ; RV32-LMULMAX4-LABEL: buildvec_mask_v32i1: @@ -503,7 +503,7 @@ ; RV32-LMULMAX4-NEXT: lui a0, 748384 ; RV32-LMULMAX4-NEXT: addi a0, a0, 1776 ; RV32-LMULMAX4-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-LMULMAX4-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX4-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX4-NEXT: ret ; ; RV64-LMULMAX4-LABEL: buildvec_mask_v32i1: @@ -511,7 +511,7 @@ ; RV64-LMULMAX4-NEXT: lui a0, 748384 ; RV64-LMULMAX4-NEXT: addiw a0, a0, 1776 ; RV64-LMULMAX4-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-LMULMAX4-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX4-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX4-NEXT: ret ; ; RV32-LMULMAX8-LABEL: buildvec_mask_v32i1: @@ -519,7 +519,7 @@ ; RV32-LMULMAX8-NEXT: lui a0, 748384 ; RV32-LMULMAX8-NEXT: addi a0, a0, 1776 ; RV32-LMULMAX8-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-LMULMAX8-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX8-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX8-NEXT: ret ; ; RV64-LMULMAX8-LABEL: buildvec_mask_v32i1: @@ -527,7 +527,7 @@ ; RV64-LMULMAX8-NEXT: lui a0, 748384 ; RV64-LMULMAX8-NEXT: addiw a0, a0, 1776 ; RV64-LMULMAX8-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-LMULMAX8-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX8-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX8-NEXT: ret ret <32 x i1> } @@ -537,13 +537,13 @@ ; RV32-LMULMAX1: # %bb.0: ; RV32-LMULMAX1-NEXT: li a0, 1776 ; RV32-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX1-NEXT: lui a0, 4 ; RV32-LMULMAX1-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX1-NEXT: vmv.v.x v9, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v9, a0 ; RV32-LMULMAX1-NEXT: lui a0, 11 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1718 -; RV32-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX1-NEXT: vmv1r.v v10, v8 ; RV32-LMULMAX1-NEXT: ret ; @@ -551,13 +551,13 @@ ; RV64-LMULMAX1: # %bb.0: ; RV64-LMULMAX1-NEXT: li a0, 1776 ; RV64-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX1-NEXT: lui a0, 4 ; RV64-LMULMAX1-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX1-NEXT: vmv.v.x v9, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v9, a0 ; RV64-LMULMAX1-NEXT: lui a0, 11 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1718 -; RV64-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX1-NEXT: vmv1r.v v10, v8 ; RV64-LMULMAX1-NEXT: ret ; @@ -566,10 +566,10 @@ ; RV32-LMULMAX2-NEXT: lui a0, 748384 ; RV32-LMULMAX2-NEXT: addi a0, a0, 1776 ; RV32-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX2-NEXT: lui a0, 748388 ; RV32-LMULMAX2-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX2-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX2-NEXT: ret ; ; RV64-LMULMAX2-LABEL: buildvec_mask_v64i1: @@ -577,10 +577,10 @@ ; RV64-LMULMAX2-NEXT: lui a0, 748384 ; RV64-LMULMAX2-NEXT: addiw a0, a0, 1776 ; RV64-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX2-NEXT: lui a0, 748388 ; RV64-LMULMAX2-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX2-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX2-NEXT: ret ; ; RV32-LMULMAX4-LABEL: buildvec_mask_v64i1: @@ -630,19 +630,19 @@ ; RV32-LMULMAX1: # %bb.0: ; RV32-LMULMAX1-NEXT: li a0, 1776 ; RV32-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX1-NEXT: lui a0, 11 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1718 -; RV32-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX1-NEXT: lui a0, 8 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1718 -; RV32-LMULMAX1-NEXT: vmv.v.x v12, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v12, a0 ; RV32-LMULMAX1-NEXT: lui a0, 4 ; RV32-LMULMAX1-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX1-NEXT: vmv.v.x v9, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v9, a0 ; RV32-LMULMAX1-NEXT: lui a0, 14 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1722 -; RV32-LMULMAX1-NEXT: vmv.v.x v14, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v14, a0 ; RV32-LMULMAX1-NEXT: vmv1r.v v10, v8 ; RV32-LMULMAX1-NEXT: vmv1r.v v11, v0 ; RV32-LMULMAX1-NEXT: vmv1r.v v13, v9 @@ -652,19 +652,19 @@ ; RV64-LMULMAX1: # %bb.0: ; RV64-LMULMAX1-NEXT: li a0, 1776 ; RV64-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX1-NEXT: lui a0, 11 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1718 -; RV64-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX1-NEXT: lui a0, 8 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1718 -; RV64-LMULMAX1-NEXT: vmv.v.x v12, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v12, a0 ; RV64-LMULMAX1-NEXT: lui a0, 4 ; RV64-LMULMAX1-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX1-NEXT: vmv.v.x v9, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v9, a0 ; RV64-LMULMAX1-NEXT: lui a0, 14 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1722 -; RV64-LMULMAX1-NEXT: vmv.v.x v14, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v14, a0 ; RV64-LMULMAX1-NEXT: vmv1r.v v10, v8 ; RV64-LMULMAX1-NEXT: vmv1r.v v11, v0 ; RV64-LMULMAX1-NEXT: vmv1r.v v13, v9 @@ -675,16 +675,16 @@ ; RV32-LMULMAX2-NEXT: lui a0, 748384 ; RV32-LMULMAX2-NEXT: addi a0, a0, 1776 ; RV32-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX2-NEXT: lui a0, 748388 ; RV32-LMULMAX2-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX2-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX2-NEXT: lui a0, 551776 ; RV32-LMULMAX2-NEXT: addi a0, a0, 1776 -; RV32-LMULMAX2-NEXT: vmv.v.x v9, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v9, a0 ; RV32-LMULMAX2-NEXT: lui a0, 945060 ; RV32-LMULMAX2-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX2-NEXT: vmv.v.x v10, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v10, a0 ; RV32-LMULMAX2-NEXT: ret ; ; RV64-LMULMAX2-LABEL: buildvec_mask_v128i1: @@ -692,16 +692,16 @@ ; RV64-LMULMAX2-NEXT: lui a0, 748384 ; RV64-LMULMAX2-NEXT: addiw a0, a0, 1776 ; RV64-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX2-NEXT: lui a0, 748388 ; RV64-LMULMAX2-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX2-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX2-NEXT: lui a0, 551776 ; RV64-LMULMAX2-NEXT: addiw a0, a0, 1776 -; RV64-LMULMAX2-NEXT: vmv.v.x v9, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v9, a0 ; RV64-LMULMAX2-NEXT: lui a0, 945060 ; RV64-LMULMAX2-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX2-NEXT: vmv.v.x v10, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v10, a0 ; RV64-LMULMAX2-NEXT: ret ; ; RV32-LMULMAX4-LABEL: buildvec_mask_v128i1: @@ -770,19 +770,19 @@ ; RV32-LMULMAX1: # %bb.0: ; RV32-LMULMAX1-NEXT: li a0, 1776 ; RV32-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX1-NEXT: lui a0, 11 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1718 -; RV32-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX1-NEXT: lui a0, 8 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1718 -; RV32-LMULMAX1-NEXT: vmv.v.x v12, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v12, a0 ; RV32-LMULMAX1-NEXT: lui a0, 4 ; RV32-LMULMAX1-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX1-NEXT: vmv.v.x v9, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v9, a0 ; RV32-LMULMAX1-NEXT: lui a0, 14 ; RV32-LMULMAX1-NEXT: addi a0, a0, 1722 -; RV32-LMULMAX1-NEXT: vmv.v.x v14, a0 +; RV32-LMULMAX1-NEXT: vmv.s.x v14, a0 ; RV32-LMULMAX1-NEXT: vmv1r.v v10, v8 ; RV32-LMULMAX1-NEXT: vmv1r.v v11, v0 ; RV32-LMULMAX1-NEXT: vmv1r.v v13, v9 @@ -792,19 +792,19 @@ ; RV64-LMULMAX1: # %bb.0: ; RV64-LMULMAX1-NEXT: li a0, 1776 ; RV64-LMULMAX1-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-LMULMAX1-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX1-NEXT: lui a0, 11 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1718 -; RV64-LMULMAX1-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX1-NEXT: lui a0, 8 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1718 -; RV64-LMULMAX1-NEXT: vmv.v.x v12, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v12, a0 ; RV64-LMULMAX1-NEXT: lui a0, 4 ; RV64-LMULMAX1-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX1-NEXT: vmv.v.x v9, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v9, a0 ; RV64-LMULMAX1-NEXT: lui a0, 14 ; RV64-LMULMAX1-NEXT: addiw a0, a0, 1722 -; RV64-LMULMAX1-NEXT: vmv.v.x v14, a0 +; RV64-LMULMAX1-NEXT: vmv.s.x v14, a0 ; RV64-LMULMAX1-NEXT: vmv1r.v v10, v8 ; RV64-LMULMAX1-NEXT: vmv1r.v v11, v0 ; RV64-LMULMAX1-NEXT: vmv1r.v v13, v9 @@ -815,16 +815,16 @@ ; RV32-LMULMAX2-NEXT: lui a0, 748384 ; RV32-LMULMAX2-NEXT: addi a0, a0, 1776 ; RV32-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV32-LMULMAX2-NEXT: lui a0, 748388 ; RV32-LMULMAX2-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX2-NEXT: vmv.v.x v8, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v8, a0 ; RV32-LMULMAX2-NEXT: lui a0, 551776 ; RV32-LMULMAX2-NEXT: addi a0, a0, 1776 -; RV32-LMULMAX2-NEXT: vmv.v.x v9, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v9, a0 ; RV32-LMULMAX2-NEXT: lui a0, 945060 ; RV32-LMULMAX2-NEXT: addi a0, a0, -1793 -; RV32-LMULMAX2-NEXT: vmv.v.x v10, a0 +; RV32-LMULMAX2-NEXT: vmv.s.x v10, a0 ; RV32-LMULMAX2-NEXT: ret ; ; RV64-LMULMAX2-LABEL: buildvec_mask_optsize_v128i1: @@ -832,16 +832,16 @@ ; RV64-LMULMAX2-NEXT: lui a0, 748384 ; RV64-LMULMAX2-NEXT: addiw a0, a0, 1776 ; RV64-LMULMAX2-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-LMULMAX2-NEXT: vmv.v.x v0, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v0, a0 ; RV64-LMULMAX2-NEXT: lui a0, 748388 ; RV64-LMULMAX2-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX2-NEXT: vmv.v.x v8, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v8, a0 ; RV64-LMULMAX2-NEXT: lui a0, 551776 ; RV64-LMULMAX2-NEXT: addiw a0, a0, 1776 -; RV64-LMULMAX2-NEXT: vmv.v.x v9, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v9, a0 ; RV64-LMULMAX2-NEXT: lui a0, 945060 ; RV64-LMULMAX2-NEXT: addiw a0, a0, -1793 -; RV64-LMULMAX2-NEXT: vmv.v.x v10, a0 +; RV64-LMULMAX2-NEXT: vmv.s.x v10, a0 ; RV64-LMULMAX2-NEXT: ret ; ; RV32-LMULMAX4-LABEL: buildvec_mask_optsize_v128i1: Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll @@ -26,11 +26,11 @@ define void @splat_v1i1(ptr %x, i1 %y) { ; CHECK-LABEL: splat_v1i1: ; CHECK: # %bb.0: -; CHECK-NEXT: andi a1, a1, 1 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v8, a1 +; CHECK-NEXT: andi a1, a1, 1 +; CHECK-NEXT: vmv.s.x v8, a1 ; CHECK-NEXT: vmsne.vi v0, v8, 0 -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma ; CHECK-NEXT: vmv.v.i v9, 0 @@ -52,9 +52,9 @@ ; CHECK-NEXT: xor a1, a1, a2 ; CHECK-NEXT: seqz a1, a1 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v8, a1 +; CHECK-NEXT: vmv.s.x v8, a1 ; CHECK-NEXT: vmsne.vi v0, v8, 0 -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma ; CHECK-NEXT: vmv.v.i v9, 0 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll @@ -1425,7 +1425,7 @@ ; RV32-NEXT: .cfi_offset ra, -4 ; RV32-NEXT: mv a2, a0 ; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v9, a1 +; RV32-NEXT: vmv.s.x v9, a1 ; RV32-NEXT: vmsne.vi v9, v9, 0 ; RV32-NEXT: vmand.mm v0, v9, v0 ; RV32-NEXT: vmv.v.i v9, 1 @@ -1446,7 +1446,7 @@ ; RV64-NEXT: .cfi_offset ra, -8 ; RV64-NEXT: mv a2, a0 ; RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-NEXT: vmv.v.x v9, a1 +; RV64-NEXT: vmv.s.x v9, a1 ; RV64-NEXT: vmsne.vi v9, v9, 0 ; RV64-NEXT: vmand.mm v0, v9, v0 ; RV64-NEXT: vmv.v.i v9, 1 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll @@ -8,7 +8,7 @@ ; CHECK-LABEL: select_v1i1: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: vmsne.vi v9, v9, 0 ; CHECK-NEXT: vmandn.mm v8, v8, v9 ; CHECK-NEXT: vmand.mm v9, v0, v9 @@ -24,7 +24,7 @@ ; CHECK-NEXT: xor a0, a0, a1 ; CHECK-NEXT: andi a0, a0, 1 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: vmsne.vi v9, v9, 0 ; CHECK-NEXT: vmandn.mm v8, v8, v9 ; CHECK-NEXT: vmand.mm v9, v0, v9 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-transpose.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-transpose.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-transpose.ll @@ -11,7 +11,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: li a0, 170 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vadd.vi v8, v11, -1 ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -27,7 +27,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vadd.vi v12, v11, 1 ; CHECK-NEXT: li a0, 170 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v8, v12 ; CHECK-NEXT: vrgather.vv v10, v9, v11, v0.t ; CHECK-NEXT: vmv1r.v v8, v10 @@ -46,7 +46,7 @@ ; RV32-NEXT: lui a0, 11 ; RV32-NEXT: addi a0, a0, -1366 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV32-NEXT: vrgather.vv v10, v9, v8, v0.t ; RV32-NEXT: vmv.v.v v8, v10 @@ -61,7 +61,7 @@ ; RV64-NEXT: lui a0, 11 ; RV64-NEXT: addiw a0, a0, -1366 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV64-NEXT: vrgather.vv v10, v9, v8, v0.t ; RV64-NEXT: vmv.v.v v8, v10 @@ -80,7 +80,7 @@ ; RV32-NEXT: lui a0, 11 ; RV32-NEXT: addi a0, a0, -1366 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV32-NEXT: vrgather.vv v10, v9, v11, v0.t ; RV32-NEXT: vmv.v.v v8, v10 @@ -95,7 +95,7 @@ ; RV64-NEXT: lui a0, 11 ; RV64-NEXT: addiw a0, a0, -1366 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV64-NEXT: vrgather.vv v10, v9, v11, v0.t ; RV64-NEXT: vmv.v.v v8, v10 @@ -141,7 +141,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: li a0, 170 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vadd.vi v8, v11, -1 ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 @@ -157,7 +157,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vadd.vi v12, v11, 1 ; CHECK-NEXT: li a0, 170 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v8, v12 ; CHECK-NEXT: vrgather.vv v10, v9, v11, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 @@ -355,7 +355,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vrgather.vv v10, v8, v11 ; CHECK-NEXT: li a0, 170 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vadd.vi v8, v11, -1 ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 @@ -371,7 +371,7 @@ ; CHECK-NEXT: vid.v v11 ; CHECK-NEXT: vadd.vi v12, v11, 1 ; CHECK-NEXT: li a0, 170 -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v8, v12 ; CHECK-NEXT: vrgather.vv v10, v9, v11, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-load-store-asm.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-load-store-asm.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-load-store-asm.ll @@ -58,7 +58,7 @@ ; V-NEXT: lui a3, 983765 ; V-NEXT: addiw a3, a3, 873 ; V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; V-NEXT: vmv.v.x v0, a3 +; V-NEXT: vmv.s.x v0, a3 ; V-NEXT: li a3, 32 ; V-NEXT: li a4, 5 ; V-NEXT: .LBB1_1: # %vector.body @@ -82,7 +82,7 @@ ; ZVE32F-NEXT: lui a3, 983765 ; ZVE32F-NEXT: addiw a3, a3, 873 ; ZVE32F-NEXT: vsetivli zero, 1, e32, m1, ta, ma -; ZVE32F-NEXT: vmv.v.x v0, a3 +; ZVE32F-NEXT: vmv.s.x v0, a3 ; ZVE32F-NEXT: li a3, 32 ; ZVE32F-NEXT: li a4, 5 ; ZVE32F-NEXT: .LBB1_1: # %vector.body @@ -333,7 +333,7 @@ ; V-NEXT: lui a4, 983765 ; V-NEXT: addiw a4, a4, 873 ; V-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; V-NEXT: vmv.v.x v0, a4 +; V-NEXT: vmv.s.x v0, a4 ; V-NEXT: li a4, 5 ; V-NEXT: .LBB6_1: # %vector.body ; V-NEXT: # =>This Inner Loop Header: Depth=1 @@ -357,7 +357,7 @@ ; ZVE32F-NEXT: lui a4, 983765 ; ZVE32F-NEXT: addiw a4, a4, 873 ; ZVE32F-NEXT: vsetivli zero, 1, e32, m1, ta, ma -; ZVE32F-NEXT: vmv.v.x v0, a4 +; ZVE32F-NEXT: vmv.s.x v0, a4 ; ZVE32F-NEXT: li a4, 5 ; ZVE32F-NEXT: .LBB6_1: # %vector.body ; ZVE32F-NEXT: # =>This Inner Loop Header: Depth=1 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmp-constrained-sdnode.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmp-constrained-sdnode.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmp-constrained-sdnode.ll @@ -56,7 +56,7 @@ ; CHECK-LABEL: fcmp_ogt_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -72,7 +72,7 @@ ; CHECK-LABEL: fcmp_ogt_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -101,7 +101,7 @@ ; CHECK-LABEL: fcmp_oge_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -117,7 +117,7 @@ ; CHECK-LABEL: fcmp_oge_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -146,7 +146,7 @@ ; CHECK-LABEL: fcmp_olt_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -162,7 +162,7 @@ ; CHECK-LABEL: fcmp_olt_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -191,7 +191,7 @@ ; CHECK-LABEL: fcmp_ole_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -207,7 +207,7 @@ ; CHECK-LABEL: fcmp_ole_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -241,7 +241,7 @@ ; CHECK-LABEL: fcmp_one_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v11, v10 @@ -262,7 +262,7 @@ ; CHECK-LABEL: fcmp_one_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v10, v11 @@ -295,7 +295,7 @@ ; CHECK-LABEL: fcmp_ord_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v8, v9 @@ -310,7 +310,7 @@ ; CHECK-LABEL: fcmp_ord_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v8 @@ -343,7 +343,7 @@ ; CHECK-LABEL: fcmp_ueq_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v11, v10 @@ -364,7 +364,7 @@ ; CHECK-LABEL: fcmp_ueq_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v10, v11 @@ -399,7 +399,7 @@ ; CHECK-LABEL: fcmp_ugt_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -416,7 +416,7 @@ ; CHECK-LABEL: fcmp_ugt_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -447,7 +447,7 @@ ; CHECK-LABEL: fcmp_uge_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -464,7 +464,7 @@ ; CHECK-LABEL: fcmp_uge_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -495,7 +495,7 @@ ; CHECK-LABEL: fcmp_ult_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -512,7 +512,7 @@ ; CHECK-LABEL: fcmp_ult_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -543,7 +543,7 @@ ; CHECK-LABEL: fcmp_ule_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -560,7 +560,7 @@ ; CHECK-LABEL: fcmp_ule_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -623,7 +623,7 @@ ; CHECK-LABEL: fcmp_uno_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfne.vf v9, v9, fa0 ; CHECK-NEXT: vmfne.vv v8, v8, v8 ; CHECK-NEXT: vmor.mm v0, v8, v9 @@ -638,7 +638,7 @@ ; CHECK-LABEL: fcmp_uno_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfne.vf v9, v9, fa0 ; CHECK-NEXT: vmfne.vv v8, v8, v8 ; CHECK-NEXT: vmor.mm v0, v9, v8 @@ -4040,7 +4040,7 @@ ; CHECK-LABEL: fcmp_ogt_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4056,7 +4056,7 @@ ; CHECK-LABEL: fcmp_ogt_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4085,7 +4085,7 @@ ; CHECK-LABEL: fcmp_oge_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4101,7 +4101,7 @@ ; CHECK-LABEL: fcmp_oge_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4130,7 +4130,7 @@ ; CHECK-LABEL: fcmp_olt_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4146,7 +4146,7 @@ ; CHECK-LABEL: fcmp_olt_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4175,7 +4175,7 @@ ; CHECK-LABEL: fcmp_ole_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4191,7 +4191,7 @@ ; CHECK-LABEL: fcmp_ole_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4225,7 +4225,7 @@ ; CHECK-LABEL: fcmp_one_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v11, v10 @@ -4246,7 +4246,7 @@ ; CHECK-LABEL: fcmp_one_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v10, v11 @@ -4279,7 +4279,7 @@ ; CHECK-LABEL: fcmp_ord_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v8, v9 @@ -4294,7 +4294,7 @@ ; CHECK-LABEL: fcmp_ord_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v8 @@ -4327,7 +4327,7 @@ ; CHECK-LABEL: fcmp_ueq_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v11, v10 @@ -4348,7 +4348,7 @@ ; CHECK-LABEL: fcmp_ueq_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v10, v11 @@ -4383,7 +4383,7 @@ ; CHECK-LABEL: fcmp_ugt_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4400,7 +4400,7 @@ ; CHECK-LABEL: fcmp_ugt_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4431,7 +4431,7 @@ ; CHECK-LABEL: fcmp_uge_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4448,7 +4448,7 @@ ; CHECK-LABEL: fcmp_uge_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4479,7 +4479,7 @@ ; CHECK-LABEL: fcmp_ult_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4496,7 +4496,7 @@ ; CHECK-LABEL: fcmp_ult_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4527,7 +4527,7 @@ ; CHECK-LABEL: fcmp_ule_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -4544,7 +4544,7 @@ ; CHECK-LABEL: fcmp_ule_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -4607,7 +4607,7 @@ ; CHECK-LABEL: fcmp_uno_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfne.vf v9, v9, fa0 ; CHECK-NEXT: vmfne.vv v8, v8, v8 ; CHECK-NEXT: vmor.mm v0, v8, v9 @@ -4622,7 +4622,7 @@ ; CHECK-LABEL: fcmp_uno_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfne.vf v9, v9, fa0 ; CHECK-NEXT: vmfne.vv v8, v8, v8 ; CHECK-NEXT: vmor.mm v0, v9, v8 @@ -7337,7 +7337,7 @@ ; CHECK-LABEL: fcmp_ogt_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7353,7 +7353,7 @@ ; CHECK-LABEL: fcmp_ogt_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7382,7 +7382,7 @@ ; CHECK-LABEL: fcmp_oge_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7398,7 +7398,7 @@ ; CHECK-LABEL: fcmp_oge_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7427,7 +7427,7 @@ ; CHECK-LABEL: fcmp_olt_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7443,7 +7443,7 @@ ; CHECK-LABEL: fcmp_olt_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7472,7 +7472,7 @@ ; CHECK-LABEL: fcmp_ole_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7488,7 +7488,7 @@ ; CHECK-LABEL: fcmp_ole_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7522,7 +7522,7 @@ ; CHECK-LABEL: fcmp_one_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v11, v10 @@ -7543,7 +7543,7 @@ ; CHECK-LABEL: fcmp_one_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v10, v11 @@ -7576,7 +7576,7 @@ ; CHECK-LABEL: fcmp_ord_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v8, v9 @@ -7591,7 +7591,7 @@ ; CHECK-LABEL: fcmp_ord_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v8 @@ -7624,7 +7624,7 @@ ; CHECK-LABEL: fcmp_ueq_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v11, v10 @@ -7645,7 +7645,7 @@ ; CHECK-LABEL: fcmp_ueq_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v10, v9, fa0 ; CHECK-NEXT: vmfeq.vv v11, v8, v8 ; CHECK-NEXT: vmand.mm v9, v10, v11 @@ -7680,7 +7680,7 @@ ; CHECK-LABEL: fcmp_ugt_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7697,7 +7697,7 @@ ; CHECK-LABEL: fcmp_ugt_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7728,7 +7728,7 @@ ; CHECK-LABEL: fcmp_uge_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7745,7 +7745,7 @@ ; CHECK-LABEL: fcmp_uge_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7776,7 +7776,7 @@ ; CHECK-LABEL: fcmp_ult_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7793,7 +7793,7 @@ ; CHECK-LABEL: fcmp_ult_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7824,7 +7824,7 @@ ; CHECK-LABEL: fcmp_ule_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v10 @@ -7841,7 +7841,7 @@ ; CHECK-LABEL: fcmp_ule_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfeq.vf v9, v9, fa0 ; CHECK-NEXT: vmfeq.vv v10, v8, v8 ; CHECK-NEXT: vmand.mm v0, v10, v9 @@ -7904,7 +7904,7 @@ ; CHECK-LABEL: fcmp_uno_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfne.vf v9, v9, fa0 ; CHECK-NEXT: vmfne.vv v8, v8, v8 ; CHECK-NEXT: vmor.mm v0, v8, v9 @@ -7919,7 +7919,7 @@ ; CHECK-LABEL: fcmp_uno_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfne.vf v9, v9, fa0 ; CHECK-NEXT: vmfne.vv v8, v8, v8 ; CHECK-NEXT: vmor.mm v0, v9, v8 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmps-constrained-sdnode.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmps-constrained-sdnode.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmps-constrained-sdnode.ll @@ -237,7 +237,7 @@ ; CHECK-LABEL: fcmps_ord_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v8, v9 @@ -252,7 +252,7 @@ ; CHECK-LABEL: fcmps_ord_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v8 @@ -508,7 +508,7 @@ ; CHECK-LABEL: fcmps_uno_vf_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmnot.m v8, v8 @@ -524,7 +524,7 @@ ; CHECK-LABEL: fcmps_uno_fv_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmnot.m v9, v9 ; CHECK-NEXT: vmfle.vv v8, v8, v8 @@ -3471,7 +3471,7 @@ ; CHECK-LABEL: fcmps_ord_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v8, v9 @@ -3486,7 +3486,7 @@ ; CHECK-LABEL: fcmps_ord_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v8 @@ -3742,7 +3742,7 @@ ; CHECK-LABEL: fcmps_uno_vf_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmnot.m v8, v8 @@ -3758,7 +3758,7 @@ ; CHECK-LABEL: fcmps_uno_fv_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmnot.m v9, v9 ; CHECK-NEXT: vmfle.vv v8, v8, v8 @@ -6131,7 +6131,7 @@ ; CHECK-LABEL: fcmps_ord_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v8, v9 @@ -6146,7 +6146,7 @@ ; CHECK-LABEL: fcmps_ord_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmand.mm v0, v9, v8 @@ -6402,7 +6402,7 @@ ; CHECK-LABEL: fcmps_uno_vf_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmfle.vv v8, v8, v8 ; CHECK-NEXT: vmnot.m v8, v8 @@ -6418,7 +6418,7 @@ ; CHECK-LABEL: fcmps_uno_fv_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vfmv.s.f v9, fa0 ; CHECK-NEXT: vmfle.vf v9, v9, fa0 ; CHECK-NEXT: vmnot.m v9, v9 ; CHECK-NEXT: vmfle.vv v8, v8, v8 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfwmacc.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfwmacc.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfwmacc.ll @@ -1330,7 +1330,7 @@ ; CHECK-LABEL: vfwmacc_vf_v1f64_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vfmv.s.f v10, fa0 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma @@ -1365,7 +1365,7 @@ ; CHECK-LABEL: vfwnmacc_vf_v1f64_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vfmv.s.f v10, fa0 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma @@ -1385,7 +1385,7 @@ ; CHECK-LABEL: vfwnmacc_fv_v1f64_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vfmv.s.f v10, fa0 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma @@ -1421,7 +1421,7 @@ ; CHECK-LABEL: vfwmsac_vf_v1f64_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vfmv.s.f v10, fa0 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma @@ -1456,7 +1456,7 @@ ; CHECK-LABEL: vfwnmsac_vf_v1f64_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vfmv.s.f v10, fa0 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma @@ -1475,7 +1475,7 @@ ; CHECK-LABEL: vfwnmsac_fv_v1f64_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vfmv.s.f v10, fa0 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vitofp-constrained-sdnode.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vitofp-constrained-sdnode.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vitofp-constrained-sdnode.ll @@ -9,7 +9,7 @@ ; CHECK-LABEL: vsitofp_v1i1_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v9, v8, -1, v0 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9 ; CHECK-NEXT: ret @@ -22,7 +22,7 @@ ; CHECK-LABEL: vuitofp_v1i1_v1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v9, v8, 1, v0 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9 ; CHECK-NEXT: ret @@ -35,7 +35,7 @@ ; CHECK-LABEL: vsitofp_v1i1_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v9, v8, -1, v0 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9 ; CHECK-NEXT: ret @@ -48,7 +48,7 @@ ; CHECK-LABEL: vuitofp_v1i1_v1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v9, v8, 1, v0 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9 ; CHECK-NEXT: ret @@ -61,7 +61,7 @@ ; CHECK-LABEL: vsitofp_v1i1_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v9, v8, -1, v0 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9 ; CHECK-NEXT: ret @@ -74,7 +74,7 @@ ; CHECK-LABEL: vuitofp_v1i1_v1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vmv.v.i v8, 0 +; CHECK-NEXT: vmv.s.x v8, zero ; CHECK-NEXT: vmerge.vim v9, v8, 1, v0 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9 ; CHECK-NEXT: ret Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vrol.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vrol.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vrol.ll @@ -31,7 +31,7 @@ ; CHECK-LABEL: vrol_vx_v1i8: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: vand.vi v10, v9, 7 ; CHECK-NEXT: vsll.vv v10, v8, v10 ; CHECK-NEXT: vrsub.vi v9, v9, 0 @@ -368,7 +368,7 @@ ; CHECK-LABEL: vrol_vx_v1i16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: vand.vi v10, v9, 15 ; CHECK-NEXT: vsll.vv v10, v8, v10 ; CHECK-NEXT: vrsub.vi v9, v9, 0 @@ -655,7 +655,7 @@ ; CHECK-LABEL: vrol_vx_v1i32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: li a0, 31 ; CHECK-NEXT: vand.vx v10, v9, a0 ; CHECK-NEXT: vsll.vv v10, v8, v10 @@ -934,7 +934,7 @@ ; CHECK-RV64-LABEL: vrol_vx_v1i64: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-RV64-NEXT: vmv.v.x v9, a0 +; CHECK-RV64-NEXT: vmv.s.x v9, a0 ; CHECK-RV64-NEXT: li a0, 63 ; CHECK-RV64-NEXT: vand.vx v10, v9, a0 ; CHECK-RV64-NEXT: vsll.vv v10, v8, v10 Index: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vror.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vror.ll +++ llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vror.ll @@ -32,7 +32,7 @@ ; CHECK-LABEL: vror_vx_v1i8: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: vand.vi v10, v9, 7 ; CHECK-NEXT: vsrl.vv v10, v8, v10 ; CHECK-NEXT: vrsub.vi v9, v9, 0 @@ -636,7 +636,7 @@ ; CHECK-LABEL: vror_vx_v1i16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: vand.vi v10, v9, 15 ; CHECK-NEXT: vsrl.vv v10, v8, v10 ; CHECK-NEXT: vrsub.vi v9, v9, 0 @@ -1149,7 +1149,7 @@ ; CHECK-LABEL: vror_vx_v1i32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; CHECK-NEXT: vmv.v.x v9, a0 +; CHECK-NEXT: vmv.s.x v9, a0 ; CHECK-NEXT: li a0, 31 ; CHECK-NEXT: vand.vx v10, v9, a0 ; CHECK-NEXT: vsrl.vv v10, v8, v10 @@ -1613,7 +1613,7 @@ ; CHECK-RV64-LABEL: vror_vx_v1i64: ; CHECK-RV64: # %bb.0: ; CHECK-RV64-NEXT: vsetivli zero, 1, e64, m1, ta, ma -; CHECK-RV64-NEXT: vmv.v.x v9, a0 +; CHECK-RV64-NEXT: vmv.s.x v9, a0 ; CHECK-RV64-NEXT: li a0, 63 ; CHECK-RV64-NEXT: vand.vx v10, v9, a0 ; CHECK-RV64-NEXT: vsrl.vv v10, v8, v10 Index: llvm/test/CodeGen/RISCV/rvv/shuffle-reverse.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/shuffle-reverse.ll +++ llvm/test/CodeGen/RISCV/rvv/shuffle-reverse.ll @@ -81,7 +81,7 @@ ; CHECK-NEXT: vrsub.vi v8, v11, 7 ; CHECK-NEXT: li a0, 255 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; CHECK-NEXT: vrgather.vv v10, v9, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 @@ -118,7 +118,7 @@ ; RV32-NEXT: lui a0, 16 ; RV32-NEXT: addi a0, a0, -1 ; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vsetvli zero, a1, e8, m2, ta, mu ; RV32-NEXT: vrgather.vv v10, v14, v8, v0.t ; RV32-NEXT: vmv.v.v v8, v10 @@ -138,7 +138,7 @@ ; RV64-NEXT: lui a0, 16 ; RV64-NEXT: addiw a0, a0, -1 ; RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vsetvli zero, a1, e8, m2, ta, mu ; RV64-NEXT: vrgather.vv v10, v14, v8, v0.t ; RV64-NEXT: vmv.v.v v8, v10 @@ -220,15 +220,13 @@ ; CHECK-LABEL: v8i16_2: ; CHECK: # %bb.0: ; CHECK-NEXT: vmv1r.v v12, v9 -; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu ; CHECK-NEXT: vid.v v14 ; CHECK-NEXT: vrsub.vi v16, v14, 15 ; CHECK-NEXT: vrgather.vv v10, v8, v16 ; CHECK-NEXT: vrsub.vi v8, v14, 7 ; CHECK-NEXT: li a0, 255 -; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 -; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v12, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 ; CHECK-NEXT: ret @@ -265,7 +263,7 @@ ; RV32-NEXT: lui a0, 16 ; RV32-NEXT: addi a0, a0, -1 ; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vsetvli zero, a1, e16, m4, ta, mu ; RV32-NEXT: vrgather.vv v8, v20, v12, v0.t ; RV32-NEXT: ret @@ -285,7 +283,7 @@ ; RV64-NEXT: lui a0, 16 ; RV64-NEXT: addiw a0, a0, -1 ; RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vsetvli zero, a1, e16, m4, ta, mu ; RV64-NEXT: vrgather.vv v8, v20, v12, v0.t ; RV64-NEXT: ret @@ -369,15 +367,13 @@ ; CHECK-LABEL: v8i32_2: ; CHECK: # %bb.0: ; CHECK-NEXT: vmv2r.v v16, v10 -; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu ; CHECK-NEXT: vid.v v20 ; CHECK-NEXT: vrsub.vi v24, v20, 15 ; CHECK-NEXT: vrgather.vv v12, v8, v24 ; CHECK-NEXT: vrsub.vi v8, v20, 7 ; CHECK-NEXT: li a0, 255 -; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 -; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v12, v16, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v12 ; CHECK-NEXT: ret @@ -404,7 +400,7 @@ ; RV32-NEXT: lui a0, %hi(.LCPI23_0) ; RV32-NEXT: addi a0, a0, %lo(.LCPI23_0) ; RV32-NEXT: li a1, 32 -; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, ma +; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, mu ; RV32-NEXT: vle32.v v0, (a0) ; RV32-NEXT: vmv4r.v v24, v12 ; RV32-NEXT: vmv4r.v v16, v8 @@ -413,9 +409,7 @@ ; RV32-NEXT: vrsub.vi v16, v16, 15 ; RV32-NEXT: lui a0, 16 ; RV32-NEXT: addi a0, a0, -1 -; RV32-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 -; RV32-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vrgather.vv v8, v24, v16, v0.t ; RV32-NEXT: ret ; @@ -424,7 +418,7 @@ ; RV64-NEXT: lui a0, %hi(.LCPI23_0) ; RV64-NEXT: addi a0, a0, %lo(.LCPI23_0) ; RV64-NEXT: li a1, 32 -; RV64-NEXT: vsetvli zero, a1, e32, m8, ta, ma +; RV64-NEXT: vsetvli zero, a1, e32, m8, ta, mu ; RV64-NEXT: vle32.v v0, (a0) ; RV64-NEXT: vmv4r.v v24, v12 ; RV64-NEXT: vmv4r.v v16, v8 @@ -433,9 +427,7 @@ ; RV64-NEXT: vrsub.vi v16, v16, 15 ; RV64-NEXT: lui a0, 16 ; RV64-NEXT: addiw a0, a0, -1 -; RV64-NEXT: vsetivli zero, 1, e32, mf2, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 -; RV64-NEXT: vsetvli zero, a1, e32, m8, ta, mu +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vrgather.vv v8, v24, v16, v0.t ; RV64-NEXT: ret %v32i32 = shufflevector <16 x i32> %a, <16 x i32> %b, <32 x i32> @@ -600,15 +592,13 @@ ; CHECK-LABEL: v8f16_2: ; CHECK: # %bb.0: ; CHECK-NEXT: vmv1r.v v12, v9 -; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu ; CHECK-NEXT: vid.v v14 ; CHECK-NEXT: vrsub.vi v16, v14, 15 ; CHECK-NEXT: vrgather.vv v10, v8, v16 ; CHECK-NEXT: vrsub.vi v8, v14, 7 ; CHECK-NEXT: li a0, 255 -; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 -; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v10, v12, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v10 ; CHECK-NEXT: ret @@ -720,15 +710,13 @@ ; CHECK-LABEL: v8f32_2: ; CHECK: # %bb.0: ; CHECK-NEXT: vmv2r.v v16, v10 -; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu ; CHECK-NEXT: vid.v v20 ; CHECK-NEXT: vrsub.vi v24, v20, 15 ; CHECK-NEXT: vrgather.vv v12, v8, v24 ; CHECK-NEXT: vrsub.vi v8, v20, 7 ; CHECK-NEXT: li a0, 255 -; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; CHECK-NEXT: vmv.v.x v0, a0 -; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmv.s.x v0, a0 ; CHECK-NEXT: vrgather.vv v12, v16, v8, v0.t ; CHECK-NEXT: vmv.v.v v8, v12 ; CHECK-NEXT: ret Index: llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-fixed.ll =================================================================== --- llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-fixed.ll +++ llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-fixed.ll @@ -21,7 +21,7 @@ ; RV32-NEXT: lui a0, 16 ; RV32-NEXT: addi a0, a0, -256 ; RV32-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV32-NEXT: vmv.v.x v0, a0 +; RV32-NEXT: vmv.s.x v0, a0 ; RV32-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV32-NEXT: vrgather.vv v9, v8, v12, v0.t ; RV32-NEXT: vmsne.vi v9, v9, 0 @@ -49,7 +49,7 @@ ; RV64-NEXT: lui a0, 16 ; RV64-NEXT: addiw a0, a0, -256 ; RV64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma -; RV64-NEXT: vmv.v.x v0, a0 +; RV64-NEXT: vmv.s.x v0, a0 ; RV64-NEXT: vsetivli zero, 16, e8, m1, ta, mu ; RV64-NEXT: vrgather.vv v9, v8, v12, v0.t ; RV64-NEXT: vmsne.vi v9, v9, 0 Index: llvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll =================================================================== --- llvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll +++ llvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll @@ -662,9 +662,7 @@ ; RV32MV-NEXT: vslide1down.vx v8, v8, a1 ; RV32MV-NEXT: vslidedown.vi v8, v8, 2 ; RV32MV-NEXT: li a0, 85 -; RV32MV-NEXT: vsetivli zero, 1, e8, mf8, ta, ma -; RV32MV-NEXT: vmv.v.x v0, a0 -; RV32MV-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; RV32MV-NEXT: vmv.s.x v0, a0 ; RV32MV-NEXT: vmv.v.i v10, 1 ; RV32MV-NEXT: vmerge.vim v10, v10, -1, v0 ; RV32MV-NEXT: vand.vv v8, v8, v10