Skip to content

Commit 8df283b

Browse files
committed
fixup! fixup! Filter out some of the INSERT_SUBREG users
1 parent de5ed1a commit 8df283b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,10 @@ RISCVVLOptimizer::checkUsers(const MachineInstr &MI) const {
15061506
for (MachineOperand &UseOp :
15071507
MRI->use_operands(UserMI.getOperand(0).getReg())) {
15081508
const MachineInstr &CandidateMI = *UseOp.getParent();
1509+
// We should not propagate the VL if the user is not a segmented store
1510+
// or another INSERT_SUBREG, since VL just works differently
1511+
// between segmented operations (per-field) v.s. other RVV ops (on the
1512+
// whole register group).
15091513
if (CandidateMI.getOpcode() == RISCV::INSERT_SUBREG ||
15101514
isSegmentedStoreInstr(CandidateMI))
15111515
Worklist.insert(&UseOp);

0 commit comments

Comments
 (0)