re PR target/46329 (ICE on ARM for __attribute__ ((vector_size (8 * sizeof(int)))) operations)

gcc/
	PR target/46329
	* config/arm/arm.c (arm_legitimate_constant_p_1): Return false
	for all Neon struct constants.

gcc/testsuite/
2011-04-04  Richard Earnshaw  <rearnsha@arm.com>
	    Richard Sandiford  <richard.sandiford@linaro.org>

	PR target/46329
	* gcc.target/arm/pr46329.c: New test.

From-SVN: r172815
This commit is contained in:
Richard Sandiford 2011-04-21 09:39:03 +00:00
parent 1a627b35d3
commit 4b18d68309
4 changed files with 28 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-04-21 Richard Sandiford <richard.sandiford@linaro.org>
PR target/46329
* config/arm/arm.c (arm_legitimate_constant_p_1): Return false
for all Neon struct constants.
2011-04-21 Richard Sandiford <richard.sandiford@linaro.org>
* target.def (legitimate_constant_p): New hook.

View File

@ -6511,8 +6511,14 @@ arm_tls_referenced_p (rtx x)
When generating pic allow anything. */
static bool
arm_legitimate_constant_p_1 (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
arm_legitimate_constant_p_1 (enum machine_mode mode, rtx x)
{
/* At present, we have no support for Neon structure constants, so forbid
them here. It might be possible to handle simple cases like 0 and -1
in future. */
if (TARGET_NEON && VALID_NEON_STRUCT_MODE (mode))
return false;
return flag_pic || !label_mentioned_p (x);
}

View File

@ -1,3 +1,9 @@
2011-04-21 Richard Earnshaw <rearnsha@arm.com>
Richard Sandiford <richard.sandiford@linaro.org>
PR target/46329
* gcc.target/arm/pr46329.c: New test.
2011-04-21 Tobias Burnus <burnus@net-b.de>
PR fortran/18918

View File

@ -0,0 +1,9 @@
/* { dg-options "-O2" } */
/* { dg-add-options arm_neon } */
int __attribute__ ((vector_size (32))) x;
void
foo (void)
{
x <<= x;
}