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/68953] [6 Regression] [graphite] Wrong code w/ -O[12] -floop-nest-optimize


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

--- Comment #1 from vries at gcc dot gnu.org ---
Created attachment 38141
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38141&action=edit
updated test-case

Fails with -O1, passes with -O2.

The problem is that this loop nest:
... 
  for (zh = 0; zh < 2; ++zh)
    for (ro = 0; ro < 3; ++ro)
      yu[ro][0] = yu[zh + 1][0];
...
is rewritten into this loop nest, which has different semantics:
...
  for (ro = 0; ro < 3; ++ro)
    for (zh = 0; zh < 2; ++zh)
      yu[ro][0] = yu[zh + 1][0];
...

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