Skip to content

Commit ab6d5fa

Browse files
[Sparc] Use isNullConstant (NFC)
1 parent 2dc6579 commit ab6d5fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/Sparc/SparcISelLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,9 +2604,8 @@ static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG,
26042604
if (LHS.getValueType().isInteger()) {
26052605
// On V9 processors running in 64-bit mode, if CC compares two `i64`s
26062606
// and the RHS is zero we might be able to use a specialized branch.
2607-
const ConstantSDNode *RHSC = dyn_cast<ConstantSDNode>(RHS);
2608-
if (is64Bit && isV9 && LHS.getValueType() == MVT::i64 && RHSC &&
2609-
RHSC->isZero() && !ISD::isUnsignedIntSetCC(CC))
2607+
if (is64Bit && isV9 && LHS.getValueType() == MVT::i64 &&
2608+
isNullConstant(RHS) && !ISD::isUnsignedIntSetCC(CC))
26102609
return DAG.getNode(SPISD::BR_REG, dl, MVT::Other, Chain, Dest,
26112610
DAG.getConstant(intCondCCodeToRcond(CC), dl, MVT::i32),
26122611
LHS);

0 commit comments

Comments
 (0)