[llvm] [InstCombine] Canonicalize `abs(sub(ext(X),ext(Y)))` -> `ext(sub(max(X,Y),min(X,Y)))` (PR #162296)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 07:57:56 PDT 2025
https://github.com/nikic commented:
I don't think that this is a good IR level canonicalization. The new form is more complex and less analyzable -- e.g. it would require teaching code about this specific pattern to recognize that the result is >= 0. And the need for correlated values make it incorrect for undef values.
https://github.com/llvm/llvm-project/pull/162296
More information about the llvm-commits
mailing list