On Mon, Nov 5, 2018 at 6:55 AM Richard Biener <rguent...@suse.de> wrote: > > > The fragile PHI copying logic in the vectorizer got confused by > constants in loop-closed PHI nodes. Fixed like the following. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. > > Richard. > > From a965417cbefd54f45ac6f2b6e3d5dc39c307da09 Mon Sep 17 00:00:00 2001 > From: Richard Guenther <rguent...@suse.de> > Date: Mon, 5 Nov 2018 13:02:48 +0100 > Subject: [PATCH] fix-pr87873 > > 2018-11-05 Richard Biener <rguent...@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. >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87889 -- H.J.