[llvm] [RISCV][VLOPT] Add support for checkUsers when UserMI is a Single-Width Integer Reduction (PR #120345)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 5 09:24:02 PST 2025
================
@@ -1028,79 +1055,113 @@ bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
return true;
}
-bool RISCVVLOptimizer::checkUsers(const MachineOperand *&CommonVL,
- MachineInstr &MI) {
+std::optional<MachineOperand>
+RISCVVLOptimizer::getVLForUser(MachineOperand &UserOp) {
----------------
lukel97 wrote:
Nit, I think a better name for this might be something like "getMinimumVLForUser".
Since for regular vector operands the minimum VL we can reduce to is the VL operand but for scalar vector operands it's one.
https://github.com/llvm/llvm-project/pull/120345
More information about the llvm-commits
mailing list