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/65935] [6 Regression] 433.milc in SPEC CPU 2006 is miscompiled


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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Building rephase.c:rephase with -fno-tree-slp-vectorize makes it succeed.

The loop is basically

register int i,j,k,dir;
register site *s;

    for(i=0,s=lattice;i<sites_on_node;i++,s++){
 for(dir=0;dir<=3;dir++){
     for(j=0;j<3;j++)for(k=0;k<3;k++){
  s->link[dir].e[j][k].real *= s->phase[dir];
  s->link[dir].e[j][k].imag *= s->phase[dir];
     }
 }
    }

where the inner two loops are unrolled and SLP applies to them.  We need to
perform swapping on some of the mult operands and then somehow fail to use
the correct vectors to build up s->phase[dir] from parts.

  vect_cst_.35_44 = {_117, _121};
  vect_cst_.36_45 = {_110, _114};
  vect_cst_.37_46 = {_103, _107};
  vect_cst_.38_47 = {_92, _96};
  vect_cst_.39_48 = {_85, _89};
  vect_cst_.40_52 = {_78, _82};
  vect_cst_.41_53 = {_49, _71};
  vect_cst_.42_54 = {_31, _60};
  vect_cst_.43_55 = {_24, _27};

note how these should be all {_24, _24} but only the first one is correct.

I think this is a latent issue since we do the swapping tricks.


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