[PATCH] Fix PR52298
Richard Guenther
rguenther@suse.de
Fri Feb 24 08:58:00 GMT 2012
On Thu, 23 Feb 2012, Ulrich Weigand wrote:
> 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?
Yes, I think so.
Richard.
> Bye,
> Ulrich
>
>
--
Richard Guenther <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
More information about the Gcc-patches
mailing list