aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-07-03 10:05:52 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-07-03 10:05:52 +0100
commit3755ad7514978e88809a7ad98c10592e4814a6ef (patch)
treee955f2fb1425c81f51723d14d2c517441aa68197 /gcc/tree.h
parent14fa8c1d651a2e9fd3d9e75ab746589a36c86986 (diff)
downloadgcc-3755ad7514978e88809a7ad98c10592e4814a6ef.zip
gcc-3755ad7514978e88809a7ad98c10592e4814a6ef.tar.gz
gcc-3755ad7514978e88809a7ad98c10592e4814a6ef.tar.bz2
aarch64: Fix vector-to-vector vec_extract
The documentation says: ------------------------------------------------------------------------- @cindex @code{vec_extract@var{m}@var{n}} instruction pattern @item @samp{vec_extract@var{m}@var{n}} Extract given field from the vector value. [...] The @var{n} mode is the mode of the field or vector of fields that should be extracted, [...] If @var{n} is a vector mode, the index is counted in units of that mode. ------------------------------------------------------------------------- However, Robin pointed out that, in practice, the index is counted in whole multiples of @var{n}. These are the semantics that x86 and target-independent code follow. This patch updates the aarch64 pattern to match, which also removes the FAIL. I think Robin has patches that update the documentation and make more use of the de facto semantics. I haven't found an existing testcase that shows the difference. We do now use the pattern for: union u { int32x4_t x; int32x2_t y[2]; }; int32x2_t f(int32x4_t x) { union u u = { x }; return u.y[1]; } but we were already generating perfect code for it. Because of that, it didn't really seem worth adding a specific dump test. gcc/ * config/aarch64/aarch64-simd.md (vec_extract<mode><Vhalf>): Expect the index to be 0 or 1.
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions