The following fixes the 416.gamess build with LTO by disregarding
vect_internal_def PHIs during SLP build.

Bootstrap and regtest running on x86_64-unknown-linux-gnu.

Richard.

2018-10-30  Richard Biener  <rguent...@suse.de>

        PR tree-optimization/87800
        * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
        non-induction or reduction PHIs.

diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 6ec7358c2dc..e7e5d252c00 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1116,7 +1116,9 @@ vect_build_slp_tree_2 (vec_info *vinfo,
            if (stmt_info != other_info)
              return NULL;
        }
-      else
+      else if (def_type == vect_reduction_def
+              || def_type == vect_double_reduction_def
+              || def_type == vect_nested_cycle)
        {
          /* Else def types have to match.  */
          stmt_vec_info other_info;
@@ -1130,6 +1132,8 @@ vect_build_slp_tree_2 (vec_info *vinfo,
                return NULL;
            }
        }
+      else
+       return NULL;
       node = vect_create_new_slp_node (stmts);
       return node;
     }

Reply via email to