mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 22:31:07 +08:00
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.
This commit is contained in:
parent
437eea66a4
commit
eafeba3e51
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
2020-04-16 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR tree-optimization/94598
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1150,6 +1150,10 @@ resolve_clobber (rtx pat, rtx_insn *insn)
|
||||
int ret;
|
||||
|
||||
reg = XEXP (pat, 0);
|
||||
/* For clobbers we can look through paradoxical subregs which
|
||||
we do not handle in simplify_gen_subreg_concatn. */
|
||||
if (paradoxical_subreg_p (reg))
|
||||
reg = SUBREG_REG (reg);
|
||||
if (!resolve_reg_p (reg) && !resolve_subreg_p (reg))
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user