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