[llvm] [InstCombine] Fold -X / -Y -> X / Y (PR #88422)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 13 01:01:09 PDT 2024
dtcxzyw wrote:
> > I will accept this patch when we meet this pattern in some real-world applications.
>
> If we see it in an actual application, it means that some customer has encountered an optimization opportunity which we missed. Handling potential issues before they happen is a reasonable thing to to.
I disagree. Adding unused folds makes InstCombine slow and buggy. It is also a maintenance burden for our LLVM developers and researchers who develop fuzzers and formal-method based tools.
> What concerns do you have with this patch as-is?
I am not willing to pay for the expensive call to `computeKnownBits(Op1, 0, &I)`.
https://github.com/llvm/llvm-project/pull/88422
More information about the llvm-commits
mailing list