2018-11-05 Richard Biener <rguenther@suse.de>
commit6bae816fc042d5059b3fd4ab1e00ed707309ed73
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Nov 2018 14:55:53 +0000 (5 14:55 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Nov 2018 14:55:53 +0000 (5 14:55 +0000)
tree62bd882842e65e9ca1e9b1bfc1b94458f8753104
parent8818a5202f3938e737e44469a616941f4728df24
2018-11-05  Richard Biener  <rguenther@suse.de>

PR tree-optimization/87873
* tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
argument.
* tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
* tree-vect-loop.c (vect_transform_loop): When splitting the
loop exit also create forwarder PHIs for constants.
* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
Handle constant to_arg, add extra checking we match up the correct
PHIs.

* gcc.dg/pr87873.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265812 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87873.c [new file with mode: 0644]
gcc/tree-ssa-loop-manip.c
gcc/tree-ssa-loop-manip.h
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c