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 tree-optimization/65204] New: Aligned address optimization not detected


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65204

            Bug ID: 65204
           Summary: Aligned address optimization not detected
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktietz at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org

By testing on c++-delayed-folding branch I noticed that gcc doesn't optimize
issues as tested in 'c-c++-common/fold-bitand4.c' anymore.
By looking deeper into it it shows that CCP doesn't simplify this because it
doesn't track about copy-of.

The testcase demonstrates this:

typedef char char4[4] __attribute__ ((aligned (4)));
char4 c4[4] __attribute__ ((aligned (16)));

int f (int i)
{
  __SIZE_TYPE__ h = (__SIZE_TYPE__)&c4[i];
  /* 0 */
  return 3 & h;
}


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