gcse.c (insert_insn_end_bb): Correct placement of insns when the current block starts with a CODE_LABEL and...

�
        * gcse.c (insert_insn_end_bb): Correct placement of insns when the
        current block starts with a CODE_LABEL and ends with a CALL and
        we can not find all the argument setup instructions for the CALL.

From-SVN: r27321
This commit is contained in:
Jeff Law 1999-06-02 18:19:42 -06:00
parent cd5828a94e
commit b1d26727ac

View File

@ -4189,10 +4189,27 @@ insert_insn_end_bb (expr, bb, pre)
}
}
/* If we found all the parameter loads, then we want to insert
before the first parameter load.
If we did not find all the parameter loads, then we might have
stopped on the head of the block, which could be a CODE_LABEL.
If we inserted before the CODE_LABEL, then we would be putting
the insn in the wrong basic block. In that case, put the insn
after the CODE_LABEL.
?!? Do we need to account for NOTE_INSN_BASIC_BLOCK here? */
if (GET_CODE (insn) != CODE_LABEL)
{
new_insn = emit_insn_before (pat, insn);
if (BLOCK_HEAD (bb) == insn)
BLOCK_HEAD (bb) = new_insn;
}
else
{
new_insn = emit_insn_after (pat, insn);
}
}
else
{
new_insn = emit_insn_after (pat, insn);