[llvm] [DAGCombiner] Fold (smax x (neg x)) to (abs x) (PR #164322)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 00:53:48 PDT 2025


https://github.com/nikic commented:

It looks like all the changed tests use non-canonical IR -- the middle-end already folds this. It would be good to demonstrate that this fold is useful in DAGCombine due to an interaction with legalization.

https://github.com/llvm/llvm-project/pull/164322


More information about the llvm-commits mailing list