Another partial merge.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

>From 3daa15805e831d77d5f1420ec6543a67b1870119 Mon Sep 17 00:00:00 2001
From: Richard Guenther <rguent...@suse.de>
Date: Mon, 21 Jan 2019 13:48:32 +0100
Subject: [PATCH] allow-some-invariant-conds-with-SLP

        * tree-vect-stmts.c (vect_is_simple_cond): When vectype is
        not specified still compute a comp_vectype for invariant
        compares.

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 247d4353cb5..0f4930e7ee6 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -8862,11 +8862,12 @@ vect_is_simple_cond (tree cond, vec_info *vinfo,
 
   *comp_vectype = vectype1 ? vectype1 : vectype2;
   /* Invariant comparison.  */
-  if (! *comp_vectype && vectype)
+  if (! *comp_vectype)
     {
       tree scalar_type = TREE_TYPE (lhs);
       /* If we can widen the comparison to match vectype do so.  */
       if (INTEGRAL_TYPE_P (scalar_type)
+         && vectype
          && tree_int_cst_lt (TYPE_SIZE (scalar_type),
                              TYPE_SIZE (TREE_TYPE (vectype))))
        scalar_type = build_nonstandard_integer_type

Reply via email to