[llvm] [SDAG] Fix invalid sign bit condition for abs(sub) -> abdu fold (PR #215548)
Benji Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 18:22:11 PDT 2026
Benjins wrote:
> The patch, as is, is incorrect for the case of IsAdd.
I'm a bit confused: at the moment, the patch doesn't affect what happens when `IsAdd` is true: either it's handled earlier in the function or it falls through to the `return SDValue();`. Do you mean we should also patch the code earlier in the function that deals with folding adds in the NSW case?
https://github.com/llvm/llvm-project/pull/215548
More information about the llvm-commits
mailing list