This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/48590] New: Alias analysis confused by builtin-stack-save/restore


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 ().


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]