diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-01-15 16:52:04 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-01-16 10:04:48 +0000 |
commit | 5c06093ce90ac3fc1efe89c1897ea19b805cdd3d (patch) | |
tree | 42d5355024880493bfa3cc3502bcfa2692f5dd27 /gcc | |
parent | c35a3046247c495509610b50c7a85683d540811a (diff) | |
download | gcc-5c06093ce90ac3fc1efe89c1897ea19b805cdd3d.zip gcc-5c06093ce90ac3fc1efe89c1897ea19b805cdd3d.tar.gz gcc-5c06093ce90ac3fc1efe89c1897ea19b805cdd3d.tar.bz2 |
aarch64: Fix BE SVE mode punning involving floats
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.
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a1c1ee..0642993 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-16 Richard Sandiford <richard.sandiford@arm.com> + + * config/aarch64/aarch64.c (aarch64_split_sve_subreg_move): Apply + aarch64_sve_int_mode to each mode. + 2020-01-15 David Malcolm <dmalcolm@redhat.com> * doc/analyzer.texi (Overview): Add note about diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index ac89cc1..600a238 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); |