* [committed] aarch64: Fix BE SVE mode punning involving floats
@ 2020-01-16 11:11 Richard Sandiford
0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2020-01-16 11:11 UTC (permalink / raw)
To: gcc-patches
The patterns used by aarch64_split_sve_subreg_move only support
integer modes, so if the widest mode is a float, we should get
its integer equivalent.
Fixes gcc.target/aarch64/sel_3.c for big-endian targets.
Tested on aarch64-linux-gnu and aarch64_be-none-elf.
Richard
2020-01-16 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* config/aarch64/aarch64.c (aarch64_split_sve_subreg_move): Apply
aarch64_sve_int_mode to each mode.
---
gcc/config/aarch64/aarch64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index ac89cc1f9c9..600a238c1f4 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4827,8 +4827,8 @@ aarch64_split_sve_subreg_move (rtx dest, rtx ptrue, rtx src)
/* Decide which REV operation we need. The mode with wider elements
determines the mode of the operands and the mode with the narrower
elements determines the reverse width. */
- machine_mode mode_with_wider_elts = GET_MODE (dest);
- machine_mode mode_with_narrower_elts = GET_MODE (src);
+ machine_mode mode_with_wider_elts = aarch64_sve_int_mode (GET_MODE (dest));
+ machine_mode mode_with_narrower_elts = aarch64_sve_int_mode (GET_MODE (src));
if (GET_MODE_UNIT_SIZE (mode_with_wider_elts)
< GET_MODE_UNIT_SIZE (mode_with_narrower_elts))
std::swap (mode_with_wider_elts, mode_with_narrower_elts);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-16 10:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 11:11 [committed] aarch64: Fix BE SVE mode punning involving floats Richard Sandiford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).