mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fold conditional branches on constants away.
llvm-svn: 19360
This commit is contained in:
parent
8f55fae569
commit
53173ba1d1
@ -727,6 +727,12 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case ISD::BRCOND:
|
||||||
|
if (N2C)
|
||||||
|
if (N2C->getValue()) // Unconditional branch
|
||||||
|
return getNode(ISD::BR, MVT::Other, N1, N3);
|
||||||
|
else
|
||||||
|
return N1; // Never-taken branch
|
||||||
}
|
}
|
||||||
|
|
||||||
SDNode *N = new SDNode(Opcode, N1, N2, N3);
|
SDNode *N = new SDNode(Opcode, N1, N2, N3);
|
||||||
|
Loading…
Reference in New Issue
Block a user