diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-01-24 20:50:22 +0000 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2017-01-30 13:37:55 +0000 |
commit | 7493f0d80a56911cdb8d4d96c9b2f2bba9e32735 (patch) | |
tree | f821682749928ea3e3e071466bc1ba37dca9e6f9 /gcc | |
parent | 73ab5e694d126404172fa7ce5e598e9b4c009adb (diff) |
gcc/
Backport from trunk r244716.
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.
Change-Id: Ic4d9bfae5ac18f63895ad5d4206027ce7cbcccd6
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 26376934ff7..ff3d7ffabba 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12729,6 +12729,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++) { |