Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Avoid infinite loop between DAGCombiner::visitMUL and RISCVIS…
…elLowering::transformAddImmMulImm See #53831 for a full discussion. The basic issue is that DAGCombiner::visitMUL and RISCVISelLowering;:transformAddImmMullImm get stuck in a loop, as the current checks in transformAddImmMulImm aren't sufficient to avoid all cases where DAGCombiner::isMulAddWithConstProfitable might trigger a transformation. This patch makes transformAddImmMulImm bail out if C0 (the constant used for multiplication) has more than one use. Differential Revision: https://reviews.llvm.org/D120332 (cherry picked from commit c5bcfb9)
- Loading branch information