This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/52208] [4.7 Regression] Useless store
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Feb 2012 13:15:24 +0000
- Subject: [Bug rtl-optimization/52208] [4.7 Regression] Useless store
- Auto-submitted: auto-generated
- References: <bug-52208-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52208
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |vmakarov at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 13:15:24 UTC ---
On the testcase ira.c first adds a REG_EQUIV note for the MEM, because the
memory is not modified in the live range of the pseudo (which is just the two
insns).
With Jeff's change we end up with negative memory cost (-1000) compared to cost
of 0 for storing the pseudo in the EAX register and decide to put the pseudo
into memory (which certainly would be cheaper if the following addsi insn
accepted it as operand, but it doesn't).