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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 05:38:40 PDT 2023


https://github.com/nikic commented:

Looks ok, but some of the tests should be adjusted to check a value other than zero (preferably also some negative ones, where the one in select will be positive). And of course we should check that the case of signed min specifically does not get transformed. (It could be transformed, but only if the flag is also flipped.)

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


More information about the llvm-commits mailing list