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/39698] New: wrong types for vectorized reduction


On x86_64 for gcc.dg/vect/pr34591.c I see with type checking enabled

/space/rguenther/src/svn/trunk/gcc/testsuite/gcc.dg/vect/pr34591.c:3: error:
Incompatible types in PHI argument 1
vector int

vector short int

vect_var_.49_81 = PHI <vect_var_.49_82(10), { 0, 0, 0, 0, 0, 0, 0, 0 }(4)>

which is because vect_var_.49_81 is V4SI, not V8HI as the vector constant.

This constant is generated and added to the PHI at
vect_create_epilog_for_reduction:

  vec_initial_def = vect_get_vec_def_for_operand (reduction_op, stmt,
                                                  &adjustment_def);

  phi = reduction_phi;
  def = vect_def;
  for (j = 0; j < ncopies; j++)
    {
      /* 1.1 set the loop-entry arg of the reduction-phi:  */
      add_phi_arg (phi, vec_initial_def, loop_preheader_edge (loop));

and I'm quite confused on how the logic goes there.  The stmt to vectorize
is

patt.32_38 = [dot_prod_expr]  DOT_PROD_EXPR < D.1606_16, D.1603_10, val_25 > ;


I'll post the type verification patch shortly.


-- 
           Summary: wrong types for vectorized reduction
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code, 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=39698


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