[llvm] r315154 - [SelectionDAG} Use KnownBits::isUnknown and hasConflict. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 7 10:07:48 PDT 2017
Author: ctopper
Date: Sat Oct 7 10:07:48 2017
New Revision: 315154
URL: http://llvm.org/viewvc/llvm-project?rev=315154&view=rev
Log:
[SelectionDAG} Use KnownBits::isUnknown and hasConflict. NFC
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=315154&r1=315153&r2=315154&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Oct 7 10:07:48 2017
@@ -2128,7 +2128,7 @@ void SelectionDAG::computeKnownBits(SDVa
Known.Zero &= Known2.Zero;
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
}
break;
@@ -2166,7 +2166,7 @@ void SelectionDAG::computeKnownBits(SDVa
Known.Zero &= Known2.Zero;
}
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
if (!!DemandedRHS) {
SDValue RHS = Op.getOperand(1);
@@ -2192,7 +2192,7 @@ void SelectionDAG::computeKnownBits(SDVa
Known.Zero &= Known2.Zero;
}
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
}
break;
@@ -2276,7 +2276,7 @@ void SelectionDAG::computeKnownBits(SDVa
Known.One &= Known2.One.lshr(Offset).trunc(BitWidth);
Known.Zero &= Known2.Zero.lshr(Offset).trunc(BitWidth);
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
}
}
@@ -2349,7 +2349,7 @@ void SelectionDAG::computeKnownBits(SDVa
case ISD::SELECT:
computeKnownBits(Op.getOperand(2), Known, Depth+1);
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
computeKnownBits(Op.getOperand(1), Known2, Depth+1);
@@ -2360,7 +2360,7 @@ void SelectionDAG::computeKnownBits(SDVa
case ISD::SELECT_CC:
computeKnownBits(Op.getOperand(3), Known, Depth+1);
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
computeKnownBits(Op.getOperand(2), Known2, Depth+1);
@@ -2838,7 +2838,7 @@ void SelectionDAG::computeKnownBits(SDVa
computeKnownBits(Op.getOperand(0), Known, DemandedElts,
Depth + 1);
// If we don't know any bits, early out.
- if (!Known.One && !Known.Zero)
+ if (Known.isUnknown())
break;
computeKnownBits(Op.getOperand(1), Known2, DemandedElts, Depth + 1);
Known.Zero &= Known2.Zero;
@@ -2866,7 +2866,7 @@ void SelectionDAG::computeKnownBits(SDVa
break;
}
- assert((Known.Zero & Known.One) == 0 && "Bits known to be one AND zero?");
+ assert(!Known.hasConflict() && "Bits known to be one AND zero?");
}
SelectionDAG::OverflowKind SelectionDAG::computeOverflowKind(SDValue N0,
More information about the llvm-commits
mailing list