mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc04e5ead3
commit
722cb36069
@ -1360,14 +1360,13 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
|||||||
// Ensure that libcalls are emitted before a branch.
|
// Ensure that libcalls are emitted before a branch.
|
||||||
Tmp1 = DAG.getNode(ISD::TokenFactor, MVT::Other, Tmp1, LastCALLSEQ_END);
|
Tmp1 = DAG.getNode(ISD::TokenFactor, MVT::Other, Tmp1, LastCALLSEQ_END);
|
||||||
Tmp1 = LegalizeOp(Tmp1);
|
Tmp1 = LegalizeOp(Tmp1);
|
||||||
LastCALLSEQ_END = DAG.getEntryNode();
|
|
||||||
|
|
||||||
Tmp2 = Node->getOperand(2); // LHS
|
Tmp2 = Node->getOperand(2); // LHS
|
||||||
Tmp3 = Node->getOperand(3); // RHS
|
Tmp3 = Node->getOperand(3); // RHS
|
||||||
Tmp4 = Node->getOperand(1); // CC
|
Tmp4 = Node->getOperand(1); // CC
|
||||||
|
|
||||||
LegalizeSetCCOperands(Tmp2, Tmp3, Tmp4);
|
LegalizeSetCCOperands(Tmp2, Tmp3, Tmp4);
|
||||||
|
LastCALLSEQ_END = DAG.getEntryNode();
|
||||||
|
|
||||||
// If we didn't get both a LHS and RHS back from LegalizeSetCCOperands,
|
// If we didn't get both a LHS and RHS back from LegalizeSetCCOperands,
|
||||||
// the LHS is a legal SETCC itself. In this case, we need to compare
|
// the LHS is a legal SETCC itself. In this case, we need to compare
|
||||||
// the result against zero to select between true and false values.
|
// the result against zero to select between true and false values.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user