tree-vect-stmts.c (vectorizable_assignment): Support useless boolean conversion.

gcc/

	* tree-vect-stmts.c (vectorizable_assignment): Support
	useless boolean conversion.

From-SVN: r231503
This commit is contained in:
Ilya Enkovich 2015-12-10 11:23:50 +00:00 committed by Ilya Enkovich
parent 17cfefad6d
commit 2dab46d5fc
2 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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,