mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
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:
parent
9cd87dbccb
commit
c7af17923e
@ -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!
|
||||
|
Loading…
x
Reference in New Issue
Block a user