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
This commit is contained in:
Igor Zamyatin 2014-12-16 08:35:29 +00:00 committed by Kirill Yukhin
parent 744868aa9c
commit ad52126ec3
2 changed files with 11 additions and 4 deletions

View file

@ -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 ...

View file

@ -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++;