diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index b75fdb2..eb268e3 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3553,6 +3553,24 @@ verify_gimple_assign_unary (gassign *stmt) { CASE_CONVERT: { + /* Allow conversions between vectors with the same number of elements, + provided that the conversion is OK for the element types too. */ + if (VECTOR_TYPE_P (lhs_type) + && VECTOR_TYPE_P (rhs1_type) + && known_eq (TYPE_VECTOR_SUBPARTS (lhs_type), + TYPE_VECTOR_SUBPARTS (rhs1_type))) + { + lhs_type = TREE_TYPE (lhs_type); + rhs1_type = TREE_TYPE (rhs1_type); + } + else if (VECTOR_TYPE_P (lhs_type) || VECTOR_TYPE_P (rhs1_type)) + { + error ("invalid vector types in nop conversion"); + debug_generic_expr (lhs_type); + debug_generic_expr (rhs1_type); + return true; + } + /* Allow conversions from pointer type to integral type only if there is no sign or zero extension involved. For targets were the precision of ptrofftype doesn't match that |