Skip to content
Commit e80da0f8 authored by Craig Topper's avatar Craig Topper
Browse files

[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
parent 12d8e175
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment