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/39675] New: [4.4 Regression] ICE in vect_get_vec_def_for_operand, at tree-vect-transform.c:1999


typedef struct {
    float vertexAttrib[16][4];
    float vertexAttribPre[16][4];
    float rasterAttrib[16][4];
    float rasterAttribPre[16][4];
} CRCurrentState;
void crStateCurrentInit(CRCurrentState *c)
{
  unsigned int i;
  for (i = 0; i < 16; i++)
    {
      (c->vertexAttribPre[i])[0] = (c->vertexAttrib[i])[0];
      (c->vertexAttribPre[i])[1] = (c->vertexAttrib[i])[1];
      (c->vertexAttribPre[i])[2] = (c->vertexAttrib[i])[2];
      (c->vertexAttribPre[i])[3] = (c->vertexAttrib[i])[3];
      (c->rasterAttrib[i])[0] = (c->vertexAttrib[i])[0];
      (c->rasterAttrib[i])[1] = (c->vertexAttrib[i])[1];
      (c->rasterAttrib[i])[2] = (c->vertexAttrib[i])[2];
      (c->rasterAttrib[i])[3] = (c->vertexAttrib[i])[3];
      (c->rasterAttribPre[i])[0] = (c->vertexAttrib[i])[0];
      (c->rasterAttribPre[i])[1] = (c->vertexAttrib[i])[1];
      (c->rasterAttribPre[i])[2] = (c->vertexAttrib[i])[2];
      (c->rasterAttribPre[i])[3] = (c->vertexAttrib[i])[3];
    }
}

gcc-4.4 -S bug492696.3.i -o /dev/null -O3
bug492696.3.i: In function ?crStateCurrentInit?:
bug492696.3.i:7: internal compiler error: in vect_get_vec_def_for_operand, at
tree-vect-transform.c:1999
Please submit a full bug report,
with preprocessed source if appropriate.

It looks like the vectorizer gets confused by predictive commoning
(-fno-predictive-commoning fixes this).  On trunk FRE already optimizes
the redundant loads so no SSA_NAME copies rename (which appearantly
confuse the vectorizer):

  # VUSE <SMT.11_58>
  D.1603_6 = c_5(D)->vertexAttrib[i_57][0];
  c___vertexAttribc__I_I_I_lsm0.28_56 = D.1603_6;
...
  D.1603_18 = c___vertexAttribc__I_I_I_lsm0.28_56;
  # SMT.11_47 = VDEF <SMT.11_46>
  c_5(D)->rasterAttrib[i_57][0] = D.1603_18;


-- 
           Summary: [4.4 Regression] ICE in vect_get_vec_def_for_operand, at
                    tree-vect-transform.c:1999
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39675


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