This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix PR52298


Richard Guenther wrote:

> 	PR tree-optimization/52298
> 	* tree-vect-stmts.c (vectorizable_store): Properly use
> 	STMT_VINFO_DR_STEP instead of DR_STEP when vectorizing
> 	outer loops.
> 	(vectorizable_load): Likewise.
> 	* tree-vect-data-refs.c (vect_analyze_data_ref_access):
> 	Access DR_STEP after ensuring it is not NULL.

This causes a bunch of regressions on SPU:

FAIL: gcc.dg/vect/vect-outer-fir-big-array.c (internal compiler error)
FAIL: gcc.dg/vect/vect-outer-fir-big-array.c (test for excess errors)
WARNING: gcc.dg/vect/vect-outer-fir-big-array.c compilation failed to produce executable
FAIL: gcc.dg/vect/vect-outer-fir-big-array.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 2
FAIL: gcc.dg/vect/vect-outer-fir-lb-big-array.c (internal compiler error)
FAIL: gcc.dg/vect/vect-outer-fir-lb-big-array.c (test for excess errors)
WARNING: gcc.dg/vect/vect-outer-fir-lb-big-array.c compilation failed to produce executable
FAIL: gcc.dg/vect/vect-outer-fir-lb-big-array.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 2
FAIL: gcc.dg/vect/vect-outer-fir-lb.c (internal compiler error)
FAIL: gcc.dg/vect/vect-outer-fir-lb.c (test for excess errors)
WARNING: gcc.dg/vect/vect-outer-fir-lb.c compilation failed to produce executable
FAIL: gcc.dg/vect/vect-outer-fir-lb.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 2
FAIL: gcc.dg/vect/vect-outer-fir.c (internal compiler error)
FAIL: gcc.dg/vect/vect-outer-fir.c (test for excess errors)
WARNING: gcc.dg/vect/vect-outer-fir.c compilation failed to produce executable
FAIL: gcc.dg/vect/vect-outer-fir.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 2

all due to ICEs of the same type:

 internal compiler error: in vectorizable_load, at tree-vect-stmts.c:4665

The assert in question looks like:

  if (nested_in_vect_loop
      && (TREE_INT_CST_LOW (STMT_VINFO_DR_STEP (stmt_info))
          % GET_MODE_SIZE (TYPE_MODE (vectype)) != 0))
    { 
      gcc_assert (alignment_support_scheme != dr_explicit_realign_optimized);
      compute_in_loop = true;
    }

where your patch changed DR_STEP to STMT_VINFO_DR_STEP (reverting just this
one change makes the ICEs go away).

However, at the place where the decision to use the dr_explicit_realign_optimized 
strategy is made (tree-vect-data-refs.c:vect_supportable_dr_alignment), we still
have:

          if ((nested_in_vect_loop
               && (TREE_INT_CST_LOW (DR_STEP (dr))
                   != GET_MODE_SIZE (TYPE_MODE (vectype))))
              || !loop_vinfo)
            return dr_explicit_realign;
          else
            return dr_explicit_realign_optimized;

Should this now also use STMT_VINFO_DR_STEP?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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