[05/46] Fix make_ssa_name call in vectorizable_reduction
commit50921328dd1c025aa9d66f4d91094d125f9dd4c3
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 14:21:32 +0000 (31 14:21 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 14:21:32 +0000 (31 14:21 +0000)
treeffc5cfc6e866b380448c60cfcef1d1439dd8a726
parent6340aaa8e8e08c2621d9fc39b3b3cc6c55967c93
[05/46] Fix make_ssa_name call in vectorizable_reduction

The usual vectoriser dance to create new assignments is:

    new_stmt = gimple_build_assign (vec_dest, ...);
    new_temp = make_ssa_name (vec_dest, new_stmt);
    gimple_assign_set_lhs (new_stmt, new_temp);

but one site in vectorizable_reduction used:

    new_temp = make_ssa_name (vec_dest, new_stmt);

before creating new_stmt.

This method of creating statements probably needs cleaning up, but
that's for another day...

2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-loop.c (vectorizable_reduction): Fix an instance in
which make_ssa_name was called with new_stmt before new_stmt
had been created.

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