[llvm] c582146 - [LegalizeTypes] Use ISD::isTrueWhenEqual to simplify code. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 22:49:31 PDT 2023
Author: Craig Topper
Date: 2023-05-09T22:49:22-07:00
New Revision: c582146a491aa669b0f9b7ca63ca07d5fb021033
URL: https://github.com/llvm/llvm-project/commit/c582146a491aa669b0f9b7ca63ca07d5fb021033
DIFF: https://github.com/llvm/llvm-project/commit/c582146a491aa669b0f9b7ca63ca07d5fb021033.diff
LOG: [LegalizeTypes] Use ISD::isTrueWhenEqual to simplify code. NFC
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index b80eeedbdf737..7dcc0fbc8170f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -5022,8 +5022,7 @@ void DAGTypeLegalizer::IntegerExpandSetCCOperands(SDValue &NewLHS,
ConstantSDNode *LoCmpC = dyn_cast<ConstantSDNode>(LoCmp.getNode());
ConstantSDNode *HiCmpC = dyn_cast<ConstantSDNode>(HiCmp.getNode());
- bool EqAllowed = (CCCode == ISD::SETLE || CCCode == ISD::SETGE ||
- CCCode == ISD::SETUGE || CCCode == ISD::SETULE);
+ bool EqAllowed = ISD::isTrueWhenEqual(CCCode);
// FIXME: Is the HiCmpC->isOne() here correct for
// ZeroOrNegativeOneBooleanContent.
More information about the llvm-commits
mailing list