This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48590] New: Alias analysis confused by builtin-stack-save/restore
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Apr 2011 11:02:40 +0000
- Subject: [Bug middle-end/48590] New: Alias analysis confused by builtin-stack-save/restore
- Auto-submitted: auto-generated
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 ().