Legalize unconditional branches too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-01-07 22:12:08 +00:00
parent 9cd87dbccb
commit c7af17923e

View File

@ -301,6 +301,12 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
}
break;
case ISD::BR:
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
if (Tmp1 != Node->getOperand(0))
Result = DAG.getNode(ISD::BR, MVT::Other, Tmp1, Node->getOperand(1));
break;
case ISD::BRCOND:
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
// FIXME: booleans might not be legal!