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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 09:59:44 PST 2024


preames wrote:

I think the net effect of this change is to simply treat the scalar value as consuming VL elements.  This is a conservative approximation (i.e. correct).  However, can't the same effect be achieved by having getOperandInfo return that result for the scalar operand, and then removing the special case entirely?

Your code as written is missing the check that the scalar operand has the same SEW as the instruction defining that value.  That's a functional bug.

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


More information about the llvm-commits mailing list