[llvm] [RISCV][VLOPT] Allow propagation even when VL isn't VLMAX (PR #112228)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 09:09:26 PDT 2024
================
@@ -643,8 +644,34 @@ bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
const MachineOperand &VLOp = MI.getOperand(VLOpNum);
- if (!VLOp.isImm() || VLOp.getImm() != RISCV::VLMaxSentinel)
+ if (((VLOp.isImm() && VLOp.getImm() != RISCV::VLMaxSentinel) ||
----------------
lukel97 wrote:
Should this be
```suggestion
if (((VLOp.isImm() && VLOp.getImm() == RISCV::VLMaxSentinel) ||
```
https://github.com/llvm/llvm-project/pull/112228
More information about the llvm-commits
mailing list