From: Igor Zamyatin Date: Tue, 16 Dec 2014 08:35:29 +0000 (+0000) Subject: i386.c (ix86_address_cost): Add explicit restriction to RTL level for the check for... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad52126ec303c6c493620978d9c1316768779d8b;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81cf70bd9de..36dcc97dfb8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-16 Igor Zamyatin + + * config/i386/i386.c (ix86_address_cost): Add explicit restriction + to RTL level for the check for PIC register. + 2014-12-16 Uros Bizjak * 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 bfb135e8c45..72c1219c4c0 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++;