]> gcc.gnu.org Git - gcc.git/commit
rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]
authorKewen Lin <linkw@linux.ibm.com>
Tue, 26 Jul 2022 02:29:14 +0000 (21:29 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Tue, 2 Aug 2022 02:23:30 +0000 (21:23 -0500)
commita2ead00af2731e5551b15523ebf8f3e68c4e2ecb
tree1e8af7017443496e1e6e20d06b8d030d1f7768db
parent8df6262fa045644473f4420be0d2efac8b758314
rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]

As test case in PR106091 shows, rs6000 specific pass swaps
doesn't preserve the reg_note REG_EH_REGION when replacing
some load insn at the end of basic block, it causes the
flow info verification to fail unexpectedly.  Since memory
reference rtx may trap, this patch is to ensure we copy
REG_EH_REGION reg_note while replacing swapped aligned load
or store.

PR target/106091

gcc/ChangeLog:

* config/rs6000/rs6000-p8swap.c (replace_swapped_aligned_store): Copy
REG_EH_REGION when replacing one store insn having it.
(replace_swapped_aligned_load): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr106091.c: New test.

(cherry picked from commit f4286601933406142b46693660f7f4b682cb50a5)
gcc/config/rs6000/rs6000-p8swap.c
gcc/testsuite/gcc.target/powerpc/pr106091.c [new file with mode: 0644]
This page took 0.061098 seconds and 6 git commands to generate.