diff options
author | Vladimir N. Makarov <vmakarov@redhat.com> | 2023-05-30 15:54:28 -0400 |
---|---|---|
committer | Vladimir N. Makarov <vmakarov@redhat.com> | 2023-05-30 15:57:18 -0400 |
commit | 30038a207c10a2783fa2695b62c7c8458ef05e73 (patch) | |
tree | bbed5f80b155622418f26839285dc843d83846b3 /gcc/tree-vectorizer.h | |
parent | 2720bbd597f56742a17119dfe80edc2ba86af255 (diff) | |
download | gcc-30038a207c10a2783fa2695b62c7c8458ef05e73.zip gcc-30038a207c10a2783fa2695b62c7c8458ef05e73.tar.gz gcc-30038a207c10a2783fa2695b62c7c8458ef05e73.tar.bz2 |
LRA: Update insn sp offset if its input reload changes SP
The patch fixes a bug when there is input reload changing SP. The bug was
triggered by switching H8300 target to LRA. The insn in question is
(insn 21 20 22 2 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [3 S4 A32])
(reg/f:SI 31)) "j.c":10:3 19 {*movsi}
(expr_list:REG_DEAD (reg/f:SI 31)
(expr_list:REG_ARGS_SIZE (const_int 4 [0x4])
(nil))))
The memory address is reloaded but the SP offset for the original insn was not updated.
gcc/ChangeLog:
* lra-int.h (lra_update_sp_offset): Add the prototype.
* lra.cc (setup_sp_offset): Change the return type. Use
lra_update_sp_offset.
* lra-eliminations.cc (lra_update_sp_offset): New function.
(lra_process_new_insns): Push the current insn to reprocess if the
input reload changes sp offset.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions