]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix ICE in get_initial_defs_for_reduction (PR 88567)
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jan 2019 16:00:52 +0000 (16:00 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jan 2019 16:00:52 +0000 (16:00 +0000)
commitb4271aab179851fb13d3ac5d14d0d1ad270a83f4
tree172176ce412363181232105e2e60d4016975e8a3
parentfc6ac813e1a06a6e0a71eb02493669428b47e855
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.sandiford@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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267652 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-vect-loop.c