[RISCV] Disable combineBinOpToReduce if the reduction AVL might be 0.
If the reduction AVL is 0, operand 0 of the reduction will be returned rather than the scalar input. To make the fold legal, we would need to fold the new scalar value with whatever operand 0 is which may require a new scalar operation before the reduction. Block the combine if we can't prove AVL is non-zero. Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D149174
Loading
Please sign in to comment