[Bug tree-optimization/56049] [7 Regression] Simplification to constants not done
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 10 13:13:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56049
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Known to work| |6.3.0
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |7.0
Summary|Simplification to constants |[7 Regression]
|not done |Simplification to constants
| |not done
--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
Actually LIM after PRE performs store-motion and thus SCCP should be able to
analyze this. That lim is after vectorization though and as we have the
initial LIM now before PRE that doesn't work any longer.
For GCC 6 the bug was fixed:
<bb 2>:
a = {};
MEM[(c_char * {ref-all})&a] = { 10000000, 10000000, 10000000, 10000000 };
MEM[(c_char * {ref-all})&a + 16B] = { 10000000, 10000000, 10000000, 10000000
};
MEM[(c_char * {ref-all})&a + 32B] = { 10000000, 10000000, 10000000, 10000000
};
MEM[(c_char * {ref-all})&a + 48B] = { 10000000, 10000000, 10000000, 10000000
};
MEM[(c_char * {ref-all})&a + 64B] = { 10000000, 10000000, 10000000, 10000000
};
MEM[(c_char * {ref-all})&a + 80B] = { 10000000, 10000000, 10000000, 10000000
};
MEM[(c_char * {ref-all})&a + 96B] = { 10000000, 10000000, 10000000, 10000000
};
...
putting back regression marker, mine (for a look into LIMs DR analysis which
doesn't see MEM[(integer(kind=4)[64] *)&a][0] and MEM[(c_char * {ref-all})&a]
are "equal".
The FE generates:
while (1)
{
{
logical(kind=1) D.3491;
D.3491 = i > 10000000;
if (D.3491) goto L.4;
{
static integer(kind=4) C.3492 = 1;
add (&b, &a, &C.3492);
}
(void) __builtin_memcpy ((void *) &a, (void *) &b, 256);
L.3:;
i = i + 1;
}
}
so that's where the ref-all comes from (the memcpy).
More information about the Gcc-bugs
mailing list