[all-commits] [llvm/llvm-project] e80da0: [RISCV] Disable combineBinOpToReduce if the reduct...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Apr 25 18:47:24 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e80da0f8409aaf70d18b12c5d5d884f2c9cbddcc
https://github.com/llvm/llvm-project/commit/e80da0f8409aaf70d18b12c5d5d884f2c9cbddcc
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-04-25 (Tue, 25 Apr 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list