[X86] Simplify early-exit check. NFC.

llvm-svn: 265447
This commit is contained in:
Ahmed Bougacha 2016-04-05 20:02:22 +00:00
parent 580ca237db
commit 629446ba03
1 changed files with 4 additions and 4 deletions

View File

@ -26150,10 +26150,10 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
// where Op could be BRCOND or CMOV.
//
static SDValue checkBoolTestSetCCCombine(SDValue Cmp, X86::CondCode &CC) {
// Quit if not CMP and SUB with its value result used.
if (Cmp.getOpcode() != X86ISD::CMP &&
(Cmp.getOpcode() != X86ISD::SUB || Cmp.getNode()->hasAnyUseOfValue(0)))
return SDValue();
// This combine only operates on CMP-like nodes.
if (!(Cmp.getOpcode() == X86ISD::CMP ||
(Cmp.getOpcode() == X86ISD::SUB && !Cmp->hasAnyUseOfValue(0))))
return SDValue();
// Quit if not used as a boolean value.
if (CC != X86::COND_E && CC != X86::COND_NE)