Commit fa53ca71 by Evgeny Stupachenko Committed by Kirill Yukhin

i386.c (ix86_address_cost): Lower cost for when address contains GOT register.


gcc/
	* config/i386/i386.c (ix86_address_cost): Lower cost for
	when address contains GOT register.

From-SVN: r216155
parent bcb21886
2014-10-13 Evgeny Stupachenko <evstupac@gmail.com>
* config/i386/i386.c (ix86_address_cost): Lower cost for
when address contains GOT register.
2014-10-13 Ilya Enkovich <ilya.enkovich@intel.com>
Vladimir Makarov <vmakarov@redhat.com>
......@@ -12455,9 +12455,18 @@ ix86_address_cost (rtx x, enum machine_mode, addr_space_t, bool)
|| REGNO (parts.index) >= FIRST_PSEUDO_REGISTER)))
cost++;
/* When address base or index is "pic_offset_table_rtx" we don't increase
address cost. When a memopt with "pic_offset_table_rtx" is not invariant
itself it most likely means that base or index is not invariant.
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))
&& (!REG_P (parts.base) || REGNO (parts.base) >= FIRST_PSEUDO_REGISTER)
&& parts.index
&& (!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++;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment