+2015-05-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/65491
+ * config/aarch64/aarch64.c (aarch64_short_vector_p): Move above
+ aarch64_composite_type_p. Remove check for aarch64_composite_type_p.
+ (aarch64_composite_type_p): Return false if given type and mode are
+ for a short vector.
+
2015-05-22 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (struct _slp_oprnd_info): Add second_pattern
return -1;
}
+/* Return TRUE if the type, as described by TYPE and MODE, is a short vector
+ type as described in AAPCS64 \S 4.1.2.
+
+ See the comment above aarch64_composite_type_p for the notes on MODE. */
+
+static bool
+aarch64_short_vector_p (const_tree type,
+ machine_mode mode)
+{
+ HOST_WIDE_INT size = -1;
+
+ if (type && TREE_CODE (type) == VECTOR_TYPE)
+ size = int_size_in_bytes (type);
+ else if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT
+ || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
+ size = GET_MODE_SIZE (mode);
+
+ return (size == 8 || size == 16);
+}
+
/* Return TRUE if the type, as described by TYPE and MODE, is a composite
type as described in AAPCS64 \S 4.3. This includes aggregate, union and
array types. The C99 floating-point complex types are also considered
aarch64_composite_type_p (const_tree type,
machine_mode mode)
{
+ if (aarch64_short_vector_p (type, mode))
+ return false;
+
if (type && (AGGREGATE_TYPE_P (type) || TREE_CODE (type) == COMPLEX_TYPE))
return true;
return false;
}
-/* Return TRUE if the type, as described by TYPE and MODE, is a short vector
- type as described in AAPCS64 \S 4.1.2.
-
- See the comment above aarch64_composite_type_p for the notes on MODE. */
-
-static bool
-aarch64_short_vector_p (const_tree type,
- machine_mode mode)
-{
- HOST_WIDE_INT size = -1;
-
- if (type && TREE_CODE (type) == VECTOR_TYPE)
- size = int_size_in_bytes (type);
- else if (!aarch64_composite_type_p (type, mode)
- && (GET_MODE_CLASS (mode) == MODE_VECTOR_INT
- || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT))
- size = GET_MODE_SIZE (mode);
-
- return (size == 8 || size == 16) ? true : false;
-}
-
/* Return TRUE if an argument, whose type is described by TYPE and MODE,
shall be passed or returned in simd/fp register(s) (providing these
parameter passing registers are available).
vf2_t vf2 = (vf2_t){ 17.f, 18.f };
vi4_t vi4 = (vi4_t){ 0xdeadbabe, 0xbabecafe, 0xcafebeef, 0xbeefdead };
+vlf1_t vlf1 = (vlf1_t) { 17.0 };
+
union int128_t qword;
int *int_ptr = (int *)0xabcdef0123456789ULL;
FUNC_VAL_CHECK (12, vf2_t, vf2, D0, f32in64)
FUNC_VAL_CHECK (13, vi4_t, vi4, Q0, i32in128)
FUNC_VAL_CHECK (14, int *, int_ptr, X0, flat)
+FUNC_VAL_CHECK (15, vlf1_t, vlf1, Q0, flat)
#endif