diff options
author | Igor Zamyatin <igor.zamyatin@intel.com> | 2014-12-16 08:35:29 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2014-12-16 08:35:29 +0000 |
commit | ad52126ec303c6c493620978d9c1316768779d8b (patch) | |
tree | 7395d20297882c963cbefd73a0ebd2fafb8108cd | |
parent | 744868aa9cd16183d92285eda5e3749aca79c5a5 (diff) | |
download | gcc-ad52126ec303c6c493620978d9c1316768779d8b.zip gcc-ad52126ec303c6c493620978d9c1316768779d8b.tar.gz gcc-ad52126ec303c6c493620978d9c1316768779d8b.tar.bz2 |
i386.c (ix86_address_cost): Add explicit restriction to RTL level for the check for PIC register.
gcc/
* config/i386/i386.c (ix86_address_cost): Add explicit restriction
to RTL level for the check for PIC register.
From-SVN: r218777
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81cf70b..36dcc97 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-16 Igor Zamyatin <igor.zamyatin@intel.com> + + * config/i386/i386.c (ix86_address_cost): Add explicit restriction + to RTL level for the check for PIC register. + 2014-12-16 Uros Bizjak <ubizjak@gmail.com> * config/i386/gnu-user.h (TARGET_CAN_SPLIT_STACK): Move from here ... diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index bfb135e..72c1219 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -12831,12 +12831,14 @@ ix86_address_cost (rtx x, machine_mode, addr_space_t, bool) Therefore only "pic_offset_table_rtx" could be hoisted out, which is not profitable for x86. */ if (parts.base - && (!pic_offset_table_rtx - || REGNO (pic_offset_table_rtx) != REGNO(parts.base)) + && (current_pass->type == GIMPLE_PASS + || (!pic_offset_table_rtx + || REGNO (pic_offset_table_rtx) != REGNO(parts.base))) && (!REG_P (parts.base) || REGNO (parts.base) >= FIRST_PSEUDO_REGISTER) && parts.index - && (!pic_offset_table_rtx - || REGNO (pic_offset_table_rtx) != REGNO(parts.index)) + && (current_pass->type == GIMPLE_PASS + || (!pic_offset_table_rtx + || REGNO (pic_offset_table_rtx) != REGNO(parts.index))) && (!REG_P (parts.index) || REGNO (parts.index) >= FIRST_PSEUDO_REGISTER) && parts.base != parts.index) cost++; |