From: Kyrylo Tkachov Date: Fri, 20 Jan 2017 14:36:57 +0000 (+0000) Subject: [ARM] PR target/71270 fix neon_valid_immediate for big-endian X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b0fb476f24b0cec64502a2c2bed16a0c429f8d2;p=gcc.git [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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6000e25c00a..760869e04c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-01-20 Kyrylo Tkachov + + 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 * BASE-VER: Bump to 7.0.1. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 96777f00137..934f5d141f7 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -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++) {