[llvm] [RISCV][VLOPT] Fix passthru check in getOperandInfo (PR #112244)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 12:19:00 PDT 2024
lukel97 wrote:
> Do we need to fix in isVectorOpUsedAsScalarOp too?
I think isVectorOpUsedAsScalarOp is actually correct currently, but because HasPassthru is always true. I don't think it's correct if HasPassthru is false but reductions always have a passthru, so it's never hit.
```c++
case RISCV::VFWREDUSUM_VS: {
bool HasPassthru = RISCVII::isFirstDefTiedToFirstUse(MI->getDesc());
return HasPassthru ? MO.getOperandNo() == 2 : MO.getOperandNo() == 3;
```
https://github.com/llvm/llvm-project/pull/112244
More information about the llvm-commits
mailing list