This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33315] stores not commoned by sinking
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jan 2017 17:23:54 +0000
- Subject: [Bug tree-optimization/33315] stores not commoned by sinking
- Auto-submitted: auto-generated
- References: <bug-33315-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |msebor at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
With today's top of trunk (GCC 7.0) I see the following in the optimized dump.
The redundant stores seem to have been eliminated (they are still present in
GCC 6). Therefore resolving as fixed (please reopen if I missed something).
test ()
{
int i;
<bb 2> [100.00%]:
i_8 = num;
if (i_8 == 1)
goto <bb 3>; [34.00%]
else
goto <bb 6>; [66.00%]
<bb 3> [34.00%]:
MEM[(int *)&a] = 0;
goto <bb 5>; [100.00%]
<bb 4> [34.00%]:
MEM[(int *)&a + 4B] = 0;
<bb 5> [100.00%]:
MEM[(int *)&a + 8B] = 0;
return;
<bb 6> [66.00%]:
MEM[(int *)&a] = 0;
if (i_8 == 2)
goto <bb 4>; [51.52%]
else
goto <bb 7>; [48.48%]
<bb 7> [32.00%]:
MEM[(int *)&a + 4B] = 0;
goto <bb 5>; [100.00%]
}