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

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Mon Jan  7 16:00:52 2019
New Revision: 267652

URL: https://gcc.gnu.org/viewcvs?rev=267652&root=gcc&view=rev
Log:
Fix ICE in get_initial_defs_for_reduction (PR 88567)

The use of "j" in:

              init = permute_results[number_of_vectors - j - 1];

was out-of-sync with the new flat loop structure.  Now that all that
reversing is gone, we can just use the result of duplicate_and_interleave
directly.

The other cases shouldn't be affected by postponing the insertion
of ctor_seq, since gimple_build* appends to the seq without clearing
it first (unlike some of the gimplify routines).

The ICE is already covered by gcc.dg/vect/pr63379.c.

2019-01-07  Richard Sandiford  <richard.sandif...@arm.com>

gcc/
        PR middle-end/88567
        * tree-vect-loop.c (get_initial_defs_for_reduction): Pass the
        output vector directly to duplicate_and_interleave instead of
        going through a temporary.  Postpone insertion of ctor_seq to
        the end of the loop.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-loop.c

Reply via email to