From: Ilya Enkovich Date: Thu, 10 Dec 2015 11:23:50 +0000 (+0000) Subject: tree-vect-stmts.c (vectorizable_assignment): Support useless boolean conversion. X-Git-Tag: upstream/12.2.0~50072 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2dab46d5fc9f95de16bd9bf0f219be5e64324d1f;p=platform%2Fupstream%2Fgcc.git tree-vect-stmts.c (vectorizable_assignment): Support useless boolean conversion. gcc/ * tree-vect-stmts.c (vectorizable_assignment): Support useless boolean conversion. From-SVN: r231503 --- 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 + + * tree-vect-stmts.c (vectorizable_assignment): Support + useless boolean conversion. + 2015-12-10 Alan Lawrence * 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,