[llvm] [RISCV] Don't lose elements from False in vmerge -> vmv peephole (PR #149720)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 08:33:26 PDT 2025
================
@@ -434,6 +434,14 @@ bool RISCVVectorPeephole::convertSameMaskVMergeToVMv(MachineInstr &MI) {
if (!isKnownSameDefs(TrueMask.getReg(), MIMask.getReg()))
return false;
+ // Masked off lanes past TrueVL will come from False, and converting to vmv
+ // will lose these lanes unless MIVL <= TrueVL.
+ MachineOperand &MIVL = MI.getOperand(RISCVII::getVLOpNum(MI.getDesc()));
----------------
topperc wrote:
Should these be const references?
https://github.com/llvm/llvm-project/pull/149720
More information about the llvm-commits
mailing list