Skip to content

Commit c582146

Browse files
committed
[LegalizeTypes] Use ISD::isTrueWhenEqual to simplify code. NFC
1 parent f12639d commit c582146

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5022,8 +5022,7 @@ void DAGTypeLegalizer::IntegerExpandSetCCOperands(SDValue &NewLHS,
50225022
ConstantSDNode *LoCmpC = dyn_cast<ConstantSDNode>(LoCmp.getNode());
50235023
ConstantSDNode *HiCmpC = dyn_cast<ConstantSDNode>(HiCmp.getNode());
50245024

5025-
bool EqAllowed = (CCCode == ISD::SETLE || CCCode == ISD::SETGE ||
5026-
CCCode == ISD::SETUGE || CCCode == ISD::SETULE);
5025+
bool EqAllowed = ISD::isTrueWhenEqual(CCCode);
50275026

50285027
// FIXME: Is the HiCmpC->isOne() here correct for
50295028
// ZeroOrNegativeOneBooleanContent.

0 commit comments

Comments
 (0)