Reorganize code a bit to reduce indentation. No visible functionality
change. llvm-svn: 77171
This commit is contained in:
parent
fd6a2498ab
commit
65919b5058
|
@ -1518,11 +1518,15 @@ TargetLowering::SimplifySetCC(MVT VT, SDValue N0, SDValue N1,
|
|||
case ISD::SETTRUE2: return DAG.getConstant(1, VT);
|
||||
}
|
||||
|
||||
if (isa<ConstantSDNode>(N0.getNode())) {
|
||||
// Ensure that the constant occurs on the RHS, and fold constant
|
||||
// comparisons.
|
||||
return DAG.getSetCC(dl, VT, N1, N0, ISD::getSetCCSwappedOperands(Cond));
|
||||
}
|
||||
|
||||
if (ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode())) {
|
||||
const APInt &C1 = N1C->getAPIntValue();
|
||||
if (isa<ConstantSDNode>(N0.getNode())) {
|
||||
return DAG.FoldSetCC(VT, N0, N1, Cond, dl);
|
||||
} else {
|
||||
|
||||
// If the LHS is '(srl (ctlz x), 5)', the RHS is 0/1, and this is an
|
||||
// equality comparison, then we're just comparing whether X itself is
|
||||
// zero.
|
||||
|
@ -1830,10 +1834,6 @@ TargetLowering::SimplifySetCC(MVT VT, SDValue N0, SDValue N1,
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (isa<ConstantSDNode>(N0.getNode())) {
|
||||
// Ensure that the constant occurs on the RHS.
|
||||
return DAG.getSetCC(dl, VT, N1, N0, ISD::getSetCCSwappedOperands(Cond));
|
||||
}
|
||||
|
||||
if (isa<ConstantFPSDNode>(N0.getNode())) {
|
||||
// Constant fold or commute setcc.
|
||||
|
|
Loading…
Reference in New Issue