return build_vector_from_val (type, t);
}
-/* Returns true, if ARG, an operand or a type, is convertible to TYPE
- using a NOP_EXPR. */
+/* Returns true, if ARG is convertible to TYPE using a NOP_EXPR. */
bool
fold_convertible_p (const_tree type, const_tree arg)
{
- const_tree orig = TYPE_P (arg) ? arg : TREE_TYPE (arg);
+ const_tree orig = TREE_TYPE (arg);
if (type == orig)
return true;
return (VECTOR_TYPE_P (orig)
&& known_eq (TYPE_VECTOR_SUBPARTS (type),
TYPE_VECTOR_SUBPARTS (orig))
- && fold_convertible_p (TREE_TYPE (type), TREE_TYPE (orig)));
+ && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig)));
default:
return false;
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-w -Wno-psabi -O2" } */
+
+typedef int __attribute__((__vector_size__(4))) T;
+typedef int __attribute__((__vector_size__(8))) U;
+typedef int __attribute__((__vector_size__(16))) V;
+typedef int __attribute__((__vector_size__(32))) W;
+typedef _Float32 __attribute__((__vector_size__(16))) F;
+typedef _Float64 __attribute__((__vector_size__(32))) G;
+void foo();
+
+foo(int, int, int, int, U, U, V, V, W, W, int,
+ T, int, U, U, V, V, W, W, T,
+ T, int, U, U, V, V, W, W, T,
+ T, int, W, W, T, T, int, int, int,
+ int, int, int, W, int, int, int, int, int, int,
+ V, W, T, int, int, U, F, int, int, int,
+ int, int, int, G)
+{
+ foo(0, 0, 0, 0, (U){}, (U){}, (V){}, (V){}, (W){},
+ (W){}, 2, (T){}, 0, 0, 0, 0, (U){}, (U){},
+ (V){}, (V){}, (W){}, (W){}, (T){},
+ (T){}, 0, 0, 0, 0, (U){}, (U){}, (V){},
+ (V){}, (W){}, (W){}, (T){}, (T){}, 0, 0, 0,
+ 0, 0, 0, (T){},
+ (T){}, (W){},
+ (W){}, (T){}, (T){}, 0, 0, 0, 0, 0, 0, (W){},
+ (V){}, (W){}, (T){}, 0, 0, (U){}, (F){});
+}