[llvm] [RISCV][VLOPT] Add support for checkUsers when UserMI is a Single-Width Integer Reduction (PR #120345)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 19:37:53 PST 2024


================
@@ -930,6 +950,8 @@ bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
   return true;
 }
 
+static MachineOperand One = MachineOperand::CreateImm(1);
----------------
wangpc-pp wrote:

Is this a common practice to make it a static variable?
Maybe we should change `bool RISCVVLOptimizer::checkUsers` to `std::tuple<bool, const MachineOperand&> RISCVVLOptimizer::checkUsers`?

https://github.com/llvm/llvm-project/pull/120345


More information about the llvm-commits mailing list