[Bug middle-end/48590] New: Alias analysis confused by builtin-stack-save/restore
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 13 11:02:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48590
Summary: Alias analysis confused by builtin-stack-save/restore
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
Lame testcase for now:
float foo (int i, double *d)
{
float f;
double dd;
int j;
dd = *d;
for (j = 0; j<i; ++j)
{
float a[i];
f+=a[j] + *d + dd;
}
return f;
}
we fail to CSE *d because we think that __builtin_stack_save () clobbers it.
__builtin_stack_restore () has similar effects on DSE (it appears to use
all aliased memory).
We have to be careful when improving this to not allow sinking operations
on alloca'd memory over a __builtin_stack_restore ().
More information about the Gcc-bugs
mailing list