This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50213] [4.6/4.7 Regression] Regression in space-optimized code relative to 4.5.x
- 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, 06 Sep 2011 15:45:10 +0000
- Subject: [Bug rtl-optimization/50213] [4.6/4.7 Regression] Regression in space-optimized code relative to 4.5.x
- Auto-submitted: auto-generated
- References: <bug-50213-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50213
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-06 15:45:10 UTC ---
This regressed with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161655
and with -Os -fno-tree-forwprop you get the same code as you used to get
before.
At the tree level, the difference seems to be in
<bb 3>:
- D.2724_9 = *p_8;
+ D.2724_9 = MEM[(const unsigned int *)p_2 + -4B];
csum_10 = csum_1 ^ D.2724_9;
<bb 4>:
# csum_1 = PHI <0(2), csum_10(3)>
# p_2 = PHI <p_6(2), p_8(3)>
p_8 = p_2 + -4;
if (p_8 > tlv_5(D))
goto <bb 3>;
else
goto <bb 5>;
<bb 5>:
- D.2724_11 = *p_8;
+ D.2724_11 = MEM[(const unsigned int *)p_2 + -4B];
being now done in forwprop while it wasn't possible before MEM_REF - it wasn't
valid GIMPLE.
While in the loop IVOPTs undoes the undesirable transformation back to
MEM[base: p_8], in bb5 as it is not a loop we keep the longer form and thus use
a var from the middle of the loop instead of p after the loop. That results in
different expansion.