aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wright <jonathan.wright@arm.com>2021-10-14 13:49:02 +0100
committerJonathan Wright <jonathan.wright@arm.com>2021-11-04 14:55:44 +0000
commit511245325a4d3414a951e2d489112e8372eae1b1 (patch)
treed4ecf4bfaac31fec98aedc1453118828ed4f7d4c /gcc
parent66f206b85395c273980e2b81a54dbddc4897e4a7 (diff)
downloadgcc-511245325a4d3414a951e2d489112e8372eae1b1.zip
gcc-511245325a4d3414a951e2d489112e8372eae1b1.tar.gz
gcc-511245325a4d3414a951e2d489112e8372eae1b1.tar.bz2
gcc/lower_subreg.c: Prevent decomposition if modes are not tieable
Preventing decomposition if modes are not tieable is necessary to stop AArch64 partial Neon structure modes being treated as packed in registers. This is a necessary prerequisite for a future AArch64 PCS change to maintain good code generation. gcc/ChangeLog: 2021-10-14 Jonathan Wright <jonathan.wright@arm.com> * lower-subreg.c (simple_move): Prevent decomposition if modes are not tieable.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/lower-subreg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index 2107826..f0dc63f 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -383,8 +383,10 @@ simple_move (rtx_insn *insn, bool speed_p)
non-integer mode for which there is no integer mode of the same
size. */
mode = GET_MODE (SET_DEST (set));
+ scalar_int_mode int_mode;
if (!SCALAR_INT_MODE_P (mode)
- && !int_mode_for_size (GET_MODE_BITSIZE (mode), 0).exists ())
+ && (!int_mode_for_size (GET_MODE_BITSIZE (mode), 0).exists (&int_mode)
+ || !targetm.modes_tieable_p (mode, int_mode)))
return NULL_RTX;
/* Reject PARTIAL_INT modes. They are used for processor specific