Skip to content

Commit d95a0f9

Browse files
committed
[RISCV] Use vmv.v.x for any constant VL rv32 e64 splat with equal halves
The prior logic was reasoning in terms of vsetivli immediates, but using the vmv.v.x is strongly profitable for high LMUL cases. The key difference is that the vmv.v.x form is rematerializeable during register allocation, and the vsle form is not.
1 parent bac490b commit d95a0f9

File tree

5 files changed

+1779
-2717
lines changed

5 files changed

+1779
-2717
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4372,7 +4372,7 @@ static SDValue splatPartsI64WithVL(const SDLoc &DL, MVT VT, SDValue Passthru,
43724372
(isa<RegisterSDNode>(VL) &&
43734373
cast<RegisterSDNode>(VL)->getReg() == RISCV::X0))
43744374
NewVL = DAG.getRegister(RISCV::X0, MVT::i32);
4375-
else if (isa<ConstantSDNode>(VL) && isUInt<4>(VL->getAsZExtVal()))
4375+
else if (isa<ConstantSDNode>(VL))
43764376
NewVL = DAG.getNode(ISD::ADD, DL, VL.getValueType(), VL, VL);
43774377

43784378
if (NewVL) {

0 commit comments

Comments
 (0)