tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still compute...
authorRichard Biener <rguenther@suse.de>
Tue, 7 May 2019 13:07:48 +0000 (13:07 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 7 May 2019 13:07:48 +0000 (13:07 +0000)
2019-05-07  Richard Biener  <rguenther@suse.de>

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

From-SVN: r270945

gcc/ChangeLog
gcc/tree-vect-stmts.c

index cd4eb091d2abe2c352db5406dd0520e9bfeacc8c..8770f865335f3867662a43413d624d3a64e80713 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-07  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-stmts.c (vect_is_simple_cond): When vectype is
+       not specified still compute a comp_vectype for invariant
+       compares.
+
 2019-05-07  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/90316
index 98e6df747e9ad8a2b346ab27c80d9c6208505d90..ced4264722c226e9ec93956a07b168782ce85c78 100644 (file)
@@ -8864,11 +8864,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