[llvm] [InstSimplify] Simplify the select with integer comparison relationship (PR #66668)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 08:58:57 PST 2023
================
@@ -8291,6 +8291,17 @@ static std::optional<bool> isImpliedCondICmps(const ICmpInst *LHS,
if (areMatchingOperands(L0, L1, R0, R1, AreSwappedOps))
return isImpliedCondMatchingOperands(LPred, RPred, AreSwappedOps);
+ if (LPred == ICmpInst::ICMP_SGT) {
----------------
goldsteinn wrote:
They don't seem all that different (for `sge`, `uge`, and `ugt` that is).
https://alive2.llvm.org/ce/z/aNpE5W
You only need the `C <= 0` for signed predicates.
For signed you need `nsw`. For unsigned you need `nuw`.
https://github.com/llvm/llvm-project/pull/66668
More information about the llvm-commits
mailing list