[PATCH] D94595: [Support] Simplify KnownBits::icmp helpers. NFC.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 06:23:47 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG90b310f6caf0: [Support] Simplify KnownBits::icmp helpers. NFC. (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94595/new/
https://reviews.llvm.org/D94595
Files:
llvm/lib/Support/KnownBits.cpp
Index: llvm/lib/Support/KnownBits.cpp
===================================================================
--- llvm/lib/Support/KnownBits.cpp
+++ llvm/lib/Support/KnownBits.cpp
@@ -271,9 +271,6 @@
Optional<bool> KnownBits::eq(const KnownBits &LHS, const KnownBits &RHS) {
if (LHS.isConstant() && RHS.isConstant())
return Optional<bool>(LHS.getConstant() == RHS.getConstant());
- if (LHS.getMaxValue().ult(RHS.getMinValue()) ||
- LHS.getMinValue().ugt(RHS.getMaxValue()))
- return Optional<bool>(false);
if (LHS.One.intersects(RHS.Zero) || RHS.One.intersects(LHS.Zero))
return Optional<bool>(false);
return None;
@@ -286,8 +283,6 @@
}
Optional<bool> KnownBits::ugt(const KnownBits &LHS, const KnownBits &RHS) {
- if (LHS.isConstant() && RHS.isConstant())
- return Optional<bool>(LHS.getConstant().ugt(RHS.getConstant()));
// LHS >u RHS -> false if umax(LHS) <= umax(RHS)
if (LHS.getMaxValue().ule(RHS.getMinValue()))
return Optional<bool>(false);
@@ -312,8 +307,6 @@
}
Optional<bool> KnownBits::sgt(const KnownBits &LHS, const KnownBits &RHS) {
- if (LHS.isConstant() && RHS.isConstant())
- return Optional<bool>(LHS.getConstant().sgt(RHS.getConstant()));
// LHS >s RHS -> false if smax(LHS) <= smax(RHS)
if (LHS.getSignedMaxValue().sle(RHS.getSignedMinValue()))
return Optional<bool>(false);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94595.316642.patch
Type: text/x-patch
Size: 1358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210114/a75b240e/attachment.bin>
More information about the llvm-commits
mailing list