[llvm] [SelectionDAG] Calculate KnownBits for SMIN (PR #85584)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 06:04:34 PDT 2024
================
@@ -4017,6 +4015,16 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
}
}
+ // For SMIN, if CstHigh is negative we know the result will be
----------------
jayfoad wrote:
I don't understand why any of this SMIN/SMAX handling code is needed, except for the call to KnownBits::smin/smax. Those functions are optimal, and the code here does not seem to use any knowledge that is not captured by KnownBits info.
https://github.com/llvm/llvm-project/pull/85584
More information about the llvm-commits
mailing list