[llvm] [InstCombine] Fold (a != 0) ? abs(a) : 0 (PR #70305)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 02:13:42 PDT 2023


https://github.com/nikic requested changes to this pull request.

This fold is not specific to zero values.

This should be implemented in simplifyWithOpReplaced() -- basically, you need to teach it that even if the poison flag is set, there is no derefinement if the value is not signed min.

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


More information about the llvm-commits mailing list