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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, indeed this is caused by my most recent change.  The following should fix
this, I'm going to test this on x86_64-linux (no convenient ppc testing machine
available for me right now)

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 53e52cb58cb..609cacc4971 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -5777,14 +5777,14 @@ vect_setup_realignment (vec_info *vinfo, stmt_vec_info
stmt_info,
   if (at_loop)
     *at_loop = loop_for_initial_load;

+  tree vuse = NULL_TREE;
   if (loop_for_initial_load)
-    pe = loop_preheader_edge (loop_for_initial_load);
-
-  tree vuse;
-  gphi *vphi = get_virtual_phi (loop_for_initial_load->header);
-  if (vphi)
-    vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe);
-  else
+    {
+      pe = loop_preheader_edge (loop_for_initial_load);
+      if (gphi *vphi = get_virtual_phi (loop_for_initial_load->header))
+       vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe);
+    }
+  if (!vuse)
     vuse = gimple_vuse (gsi_stmt (*gsi));

   /* 3. For the case of the optimized realignment, create the first vector

Reply via email to