diff options
-rw-r--r-- | gcc/tree-vect-stmts.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index e664978..01cb19c 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -5833,12 +5833,15 @@ vectorizable_assignment (vec_info *vinfo, /* We do not handle bit-precision changes. */ if ((CONVERT_EXPR_CODE_P (code) || code == VIEW_CONVERT_EXPR) - && INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest)) - && (!type_has_mode_precision_p (TREE_TYPE (scalar_dest)) - || !type_has_mode_precision_p (TREE_TYPE (op))) + && ((INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest)) + && !type_has_mode_precision_p (TREE_TYPE (scalar_dest))) + || (INTEGRAL_TYPE_P (TREE_TYPE (op)) + && !type_has_mode_precision_p (TREE_TYPE (op)))) /* But a conversion that does not change the bit-pattern is ok. */ - && !((TYPE_PRECISION (TREE_TYPE (scalar_dest)) - > TYPE_PRECISION (TREE_TYPE (op))) + && !(INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest)) + && INTEGRAL_TYPE_P (TREE_TYPE (op)) + && (TYPE_PRECISION (TREE_TYPE (scalar_dest)) + > TYPE_PRECISION (TREE_TYPE (op))) && TYPE_UNSIGNED (TREE_TYPE (op)))) { if (dump_enabled_p ()) |