aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-05-07 13:07:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-05-07 13:07:48 +0000
commitfcd0566b03e8e22190590bda888b48349639f1a0 (patch)
tree87b34140b2297fa0af8bb02f7e1579208f384877 /gcc
parent530ec1acebc6c7808b013ab1d7b0d8b30edeab18 (diff)
downloadgcc-fcd0566b03e8e22190590bda888b48349639f1a0.zip
gcc-fcd0566b03e8e22190590bda888b48349639f1a0.tar.gz
gcc-fcd0566b03e8e22190590bda888b48349639f1a0.tar.bz2
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> * tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still compute a comp_vectype for invariant compares. From-SVN: r270945
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-vect-stmts.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cd4eb09..8770f86 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
* tree-ssa-pre.c (translate_vuse_through_block): When
same_valid is NULL do not bother to search for a virtual
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 98e6df7..ced4264 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -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