Commit f8103b9f by Aldy Hernandez

re PR middle-end/17961 (ICE for operation on small vector with altivec enabled)

	PR 17961
	* config/rs6000/sysv4.h (ROUND_TYPE_ALIGN): Remove.
	* config/rs6000/linux64.h (ROUND_TYPE_ALIGN): Remove vector check.
	* testsuite/gcc.dg/simd-3.c: New.

From-SVN: r100820
parent 4a96e5c3
...@@ -228,13 +228,11 @@ extern int dot_symbols; ...@@ -228,13 +228,11 @@ extern int dot_symbols;
the first field is an FP double, only if in power alignment mode. */ the first field is an FP double, only if in power alignment mode. */
#undef ROUND_TYPE_ALIGN #undef ROUND_TYPE_ALIGN
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \ #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
((TARGET_ALTIVEC && TREE_CODE (STRUCT) == VECTOR_TYPE) \ ((TARGET_64BIT \
? MAX (MAX ((COMPUTED), (SPECIFIED)), 128) \ && (TREE_CODE (STRUCT) == RECORD_TYPE \
: (TARGET_64BIT \ || TREE_CODE (STRUCT) == UNION_TYPE \
&& (TREE_CODE (STRUCT) == RECORD_TYPE \ || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
|| TREE_CODE (STRUCT) == UNION_TYPE \ && TARGET_ALIGN_NATURAL == 0) \
|| TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
&& TARGET_ALIGN_NATURAL == 0) \
? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \ ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
: MAX ((COMPUTED), (SPECIFIED))) : MAX ((COMPUTED), (SPECIFIED)))
......
...@@ -335,15 +335,6 @@ do { \ ...@@ -335,15 +335,6 @@ do { \
((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \ ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
? 128 : COMPUTED) ? 128 : COMPUTED)
/* Define this macro as an expression for the alignment of a type
(given by TYPE as a tree node) if the alignment computed in the
usual way is COMPUTED and the alignment explicitly specified was
SPECIFIED. */
#define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \
((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) \
? MAX (MAX ((COMPUTED), (SPECIFIED)), 128) \
: MAX (COMPUTED, SPECIFIED))
#undef BIGGEST_FIELD_ALIGNMENT #undef BIGGEST_FIELD_ALIGNMENT
/* Use ELF style section commands. */ /* Use ELF style section commands. */
......
/* { dg-do compile } */
/* { dg-options "-maltivec" { target powerpc-*-* } } */
__attribute__ ((vector_size (2))) signed char v1, v2, v3;
void
one (void)
{
v1 = v2 + v3;
}
__attribute__ ((vector_size (8))) signed char v4, v5, v6;
void
two (void)
{
v4 = v5 + v6;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment