https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626
--- Comment #23 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- Author: vmakarov Date: Thu Jul 16 15:26:35 2015 New Revision: 225891 URL: https://gcc.gnu.org/viewcvs?rev=225891&root=gcc&view=rev Log: 2015-07-16 Vladimir Makarov <vmaka...@redhat.com> PR rtl-optimization/66626 * ira.h (emit-rtl.h): Include. (non_spilled_static_chain_regno_p): New. * ira-color.c (setup_profitable_hard_regs): Clear profitable regs unless it is non spilled static chain pseudo. (assign_hard_rego): Spill memory profitable allocno unless it is non spilled static chain pseudo. (allocno_spill_priority_compare): Put non spilled static chain pseudo at the end of sorted array. (improve_allocation): Do nothing if we have static chain and non-local goto. (allocno__priority_compare_func): Put non spilled static chain pseudo at the beginning of sorted array. (move_spill_restore): Ignore non spilled static chain pseudo. * ira-costs.c (find_costs_and_classes): Don't assign class NO_REGS to non spilled static chain pseudo. * lra-assigns.c (pseudo_compare_func): Put non spilled static chain pseudo at the beginning of sorted array. (spill_for): Spill non spilled static chain pseudo last. * lra-constraints.c (lra_constraints): Remove static chain pseudo check for equivalence. 2015-07-16 Vladimir Makarov <vmaka...@redhat.com> PR rtl-optimization/66626 * gcc.target/i386/pr66626-2.c: New. Added: trunk/gcc/testsuite/gcc.target/i386/pr66626-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/ira-color.c trunk/gcc/ira-costs.c trunk/gcc/ira.h trunk/gcc/lra-assigns.c trunk/gcc/lra-constraints.c trunk/gcc/testsuite/ChangeLog