[arm] Fix BE index for single-var vector initialisers (PR91060)
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 10 Jul 2019 18:41:44 +0000 (18:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 10 Jul 2019 18:41:44 +0000 (18:41 +0000)
commit8ba8ebffc4621552febf47eea470c260488418b5
tree5fe02dc25c3ed66bc8fbe055e569aaae21a0fede
parent4b8d9b23371d3ee0f7a9c1d99e80745400542930
[arm] Fix BE index for single-var vector initialisers (PR91060)

If a vector constructor has a single nonconstant element,
neon_expand_vector_init loads the constant lanes and then inserts the
nonconstant value.  The problem was that it was doing the insertion
using the arm_neon.h neon_vset_lane<mode> patterns, which use
architectural lane numbering rather than GCC lane numbering.

2019-07-10  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR target/91060
* config/arm/iterators.md (V2DI_ONLY): New mode iterator.
* config/arm/neon.md (vec_set<mode>_internal): Add a '@' prefix.
(vec_setv2di_internal): Reexpress as...
(@vec_set<V2DI_ONLY:mode>_internal): ...this.
* config/arm/arm.c (neon_expand_vector_init): Use gen_vec_set_internal
rather than gen_neon_vset_lane<mode>.

From-SVN: r273365
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/iterators.md
gcc/config/arm/neon.md