summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-04-16 09:37:44 +0200
committerRichard Biener <rguenther@suse.de>2020-04-16 12:54:38 +0200
commiteafeba3e5187a53a4c08a3285b4b220e1ab68b60 (patch)
tree130e5753d2a1ad6a56f8c33c1c51c2f13e5e7a2d /gcc/expr.c
parent437eea66a4b010d8e94aa81c2b40ccf0588e5fab (diff)
middle-end/94614 - avoid multiword moves to nothing
This adjusts emit_move_multi_word to handle moves into paradoxical subregs parts that are not there and adjusts lower-subregs CLOBBER resolving to deal with those as well. 2020-04-16 Richard Biener <rguenther@suse.de> PR middle-end/94614 * expr.c (emit_move_multi_word): Do not generate code when the destination part is undefined_operand_subword_p. * lower-subreg.c (resolve_clobber): Look through a paradoxica subreg.
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index b97c217e86d..dfbeae71518 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3692,6 +3692,11 @@ emit_move_multi_word (machine_mode mode, rtx x, rtx y)
need_clobber = false;
for (i = 0; i < CEIL (mode_size, UNITS_PER_WORD); i++)
{
+ /* Do not generate code for a move if it would go entirely
+ to the non-existing bits of a paradoxical subreg. */
+ if (undefined_operand_subword_p (x, i))
+ continue;
+
rtx xpart = operand_subword (x, i, 1, mode);
rtx ypart;