aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-vect-stmts.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0f22548..aca8e94 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-10 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * tree-vect-stmts.c (vectorizable_assignment): Support
+ useless boolean conversion.
+
2015-12-10 Alan Lawrence <alan.lawrence@arm.com>
* doc/install.texi: Add note against GNAT 4.8 on ARM targets.
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 56aa2c8..5377d15 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -4310,7 +4310,12 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
/* But a conversion that does not change the bit-pattern is ok. */
&& !((TYPE_PRECISION (TREE_TYPE (scalar_dest))
> TYPE_PRECISION (TREE_TYPE (op)))
- && TYPE_UNSIGNED (TREE_TYPE (op))))
+ && TYPE_UNSIGNED (TREE_TYPE (op)))
+ /* Conversion between boolean types of different sizes is
+ a simple assignment in case their vectypes are same
+ boolean vectors. */
+ && (!VECTOR_BOOLEAN_TYPE_P (vectype)
+ || !VECTOR_BOOLEAN_TYPE_P (vectype_in)))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,