diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2015-07-08 15:04:54 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2015-07-08 15:04:54 +0000 |
commit | 1d6cc2e47f85b52bdfa6c4bec142b9d6ac1ca738 (patch) | |
tree | 4f395a3ca90492ec25149e62c9b15f37dd24b130 /gcc/ira-lives.c | |
parent | a92defdab79a1268f4b9dcf42b937e4002a4cf15 (diff) | |
download | gcc-1d6cc2e47f85b52bdfa6c4bec142b9d6ac1ca738.zip gcc-1d6cc2e47f85b52bdfa6c4bec142b9d6ac1ca738.tar.gz gcc-1d6cc2e47f85b52bdfa6c4bec142b9d6ac1ca738.tar.bz2 |
re PR target/66334 (cleanup block fails to initialize EBX)
2015-07-08 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/66334
* ira-lives.c (process_bb_node_lives): Make conflicts with PIC
hard regno live at the start of BB with incoming abnormal edges.
* lra-lives.c (process_bb_lives): Ditto.
2015-07-08 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/66334
* gcc.target/i386/pr66334.c: New.
From-SVN: r225561
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r-- | gcc/ira-lives.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index 4f5f3cc..44f0cbf 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -1344,7 +1344,21 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node) allocate such regs in this case. */ if (!cfun->has_nonlocal_label && bb_has_abnormal_call_pred (bb)) for (px = 0; px < FIRST_PSEUDO_REGISTER; px++) - if (call_used_regs[px]) + if (call_used_regs[px] +#ifdef REAL_PIC_OFFSET_TABLE_REGNUM + /* We should create a conflict of PIC pseudo with + PIC hard reg as PIC hard reg can have a wrong + value after jump described by the abnormal edge. + In this case we can not allocate PIC hard reg to + PIC pseudo as PIC pseudo will also have a wrong + value. This code is not critical as LRA can fix + it but it is better to have the right allocation + earlier. */ + || (px == REAL_PIC_OFFSET_TABLE_REGNUM + && pic_offset_table_rtx != NULL_RTX + && REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER) +#endif + ) make_hard_regno_born (px); } |