(if (VECTOR_TYPE_P (type)
&& (VECTOR_MODE_P (TYPE_MODE (type))
|| optimize_vectors_before_lowering_p ())
- && types_match (@0, @1)
+ && operand_equal_p (TYPE_SIZE (TREE_TYPE (@0)),
+ TYPE_SIZE (TREE_TYPE (@1)), 0)
&& types_match (TREE_TYPE (TREE_TYPE (@0)), TREE_TYPE (@2))
&& TYPE_VECTOR_SUBPARTS (type).is_constant ()
&& multiple_p (wi::to_poly_offset (@rpos),
(with
{
unsigned HOST_WIDE_INT elsz
- = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (@1))));
+ = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (@0))));
poly_uint64 relt = exact_div (tree_to_poly_uint64 (@rpos), elsz);
poly_uint64 ielt = exact_div (tree_to_poly_uint64 (@ipos), elsz);
unsigned nunits = TYPE_VECTOR_SUBPARTS (type).to_constant ();
vec_perm_indices sel (builder, 2, nunits);
}
(if (!VECTOR_MODE_P (TYPE_MODE (type))
- || can_vec_perm_const_p (TYPE_MODE (type), TYPE_MODE (type), sel, false))
- (vec_perm @0 @1 { vec_perm_indices_to_tree
- (build_vector_type (ssizetype, nunits), sel); })))))
+ || can_vec_perm_const_p (TYPE_MODE (type),
+ TYPE_MODE (type), sel, false))
+ (vec_perm @0 (view_convert @1)
+ { vec_perm_indices_to_tree (build_vector_type (ssizetype, nunits),
+ sel); })))))
(if (canonicalize_math_after_vectorization_p ())
(for fmas (FMA)
--- /dev/null
+/* { dg-final { check-function-bodies "**" "" } } */
+/* { dg-options "-O1" } */
+
+#include <arm_neon.h>
+
+/*
+** foo:
+** rev64 v0\.4s, v0\.4s
+** ret
+*/
+uint64x2_t foo (uint64x2_t r) {
+ uint32x4_t a = vreinterpretq_u32_u64 (r);
+ uint32_t t;
+ t = a[0]; a[0] = a[1]; a[1] = t;
+ t = a[2]; a[2] = a[3]; a[3] = t;
+ return vreinterpretq_u64_u32 (a);
+}