Pass UNITS_PER_WORD * BITS_PER_UNIT to force_reg, when copying data from one memory location to another with vector registers, to avoid stack realignment.
* config/i386/i386-expand.c (ix86_expand_vector_move): Pass UNITS_PER_WORD * BITS_PER_UNIT to force_reg when copying data from one memory location to another. --- gcc/config/i386/i386-expand.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c index 1942b46efbf..b3c9b94f717 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -431,7 +431,12 @@ ix86_expand_vector_move (machine_mode mode, rtx operands[]) && !register_operand (op0, mode) && !register_operand (op1, mode)) { - emit_move_insn (op0, force_reg (GET_MODE (op0), op1)); + /* NB: Don't increase stack alignment requirement when forcing + operand1 into a pseudo register to copy data from one memory + location to another since it doen't require spill. */ + emit_move_insn (op0, + force_reg (GET_MODE (op0), op1, + (UNITS_PER_WORD * BITS_PER_UNIT))); return; } -- 2.31.1