forked from OSchip/llvm-project
parent
580ca237db
commit
629446ba03
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue