aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-05-28 10:28:38 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-05-28 10:28:38 +0000
commitb29502e735e6eafd451a27422e5c8fe211ad0716 (patch)
treefa06038a88553bcf945a76d5e1658dd8fd2401f1 /gcc/tree-vect-generic.c
parent533aa46a8685713d8d8a987de016c5bcbff9c209 (diff)
downloadgcc-b29502e735e6eafd451a27422e5c8fe211ad0716.zip
gcc-b29502e735e6eafd451a27422e5c8fe211ad0716.tar.gz
gcc-b29502e735e6eafd451a27422e5c8fe211ad0716.tar.bz2
re PR tree-optimization/85934 (ICE: verify_gimple failed (error: type mismatch in vector pack expression))
2018-05-28 Richard Biener <rguenther@suse.de> PR tree-optimization/85934 * tree-vect-generic.c (expand_vector_operations_1): Hoist vector boolean check before scalar optimization. * gcc.target/i386/pr85934.c: New testcase. From-SVN: r260847
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r--gcc/tree-vect-generic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 3dcbdeb..2ade60b 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -1612,6 +1612,12 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
if (!VECTOR_TYPE_P (type)
|| !VECTOR_TYPE_P (TREE_TYPE (rhs1)))
return;
+
+ /* A scalar operation pretending to be a vector one. */
+ if (VECTOR_BOOLEAN_TYPE_P (type)
+ && !VECTOR_MODE_P (TYPE_MODE (type))
+ && TYPE_MODE (type) != BLKmode)
+ return;
/* If the vector operation is operating on all same vector elements
implement it with a scalar operation and a splat if the target
@@ -1638,12 +1644,6 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
return;
}
}
-
- /* A scalar operation pretending to be a vector one. */
- if (VECTOR_BOOLEAN_TYPE_P (type)
- && !VECTOR_MODE_P (TYPE_MODE (type))
- && TYPE_MODE (type) != BLKmode)
- return;
if (CONVERT_EXPR_CODE_P (code)
|| code == FLOAT_EXPR