[ARM] PR target/71270 fix neon_valid_immediate for big-endian

PR target/71270
	* config/arm/arm.c (neon_valid_immediate): Reject vector constants
	in big-endian mode when they are not a single duplicated value.

From-SVN: r244716
This commit is contained in:
Kyrylo Tkachov 2017-01-20 14:36:57 +00:00 committed by Kyrylo Tkachov
parent ebed71751b
commit 8b0fb476f2
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-01-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/71270
* config/arm/arm.c (neon_valid_immediate): Reject vector constants
in big-endian mode when they are not a single duplicated value.
2017-01-20 Richard Biener <rguenther@suse.de>
* BASE-VER: Bump to 7.0.1.

View File

@ -11667,6 +11667,12 @@ neon_valid_immediate (rtx op, machine_mode mode, int inverse,
return 18;
}
/* The tricks done in the code below apply for little-endian vector layout.
For big-endian vectors only allow vectors of the form { a, a, a..., a }.
FIXME: Implement logic for big-endian vectors. */
if (BYTES_BIG_ENDIAN && vector && !const_vec_duplicate_p (op))
return -1;
/* Splat vector constant out into a byte vector. */
for (i = 0; i < n_elts; i++)
{