[llvm] [InstCombine] Fold (a != 0) ? abs(a) : 0 (PR #70305)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 03:29:23 PDT 2023
nikic wrote:
I think the simplest way would be to add a special case around https://github.com/llvm/llvm-project/blob/85f6b2fac9a367337e43ca288c45ea783981cc16/llvm/lib/Analysis/InstructionSimplify.cpp#L4446C56-L4446C56 for `Intrinsic::abs` where `ConstOps[0]->isNotMinSignedValue()`.
https://github.com/llvm/llvm-project/pull/70305
More information about the llvm-commits
mailing list