From: kyukhin Date: Tue, 16 Dec 2014 08:35:29 +0000 (+0000) Subject: gcc/ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d08e2fe08139745736efbc6b4f97490bfd04fbc;p=thirdparty%2Fgcc.git gcc/ * config/i386/i386.c (ix86_address_cost): Add explicit restriction to RTL level for the check for PIC register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218777 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81cf70bd9def..36dcc97dfb82 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 bfb135e8c45d..72c1219c4c00 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++;