gcc/gcc/config/sparc
Jakub Jelinek eeca2b8bd0 sparc: Preserve ORIGINAL_REGNO in epilogue_renumber [PR105257]
The following testcase ICEs, because the pic register is
(reg:DI 24 %i0 [109]) and is used in the delay slot of a return.
We invoke epilogue_renumber and that changes it to
(reg:DI 8 %o0) which no longer satisfies sparc_pic_register_p
predicate, so we don't recognize the insn anymore.

The following patch fixes that by preserving ORIGINAL_REGNO if
specified, so we get (reg:DI 8 %o0 [109]) instead.

2022-04-19  Jakub Jelinek  <jakub@redhat.com>

	PR target/105257
	* config/sparc/sparc.cc (epilogue_renumber): If ORIGINAL_REGNO,
	use gen_raw_REG instead of gen_rtx_REG and copy over also
	ORIGINAL_REGNO.  Use return 0; instead of /* fallthrough */.

	* gcc.dg/pr105257.c: New test.
2022-04-19 18:58:59 +02:00
..
biarch64.h Update copyright years. 2022-01-03 10:42:10 +01:00
constraints.md Update copyright years. 2022-01-03 10:42:10 +01:00
cypress.md Update copyright years. 2022-01-03 10:42:10 +01:00
default64.h Update copyright years. 2022-01-03 10:42:10 +01:00
driver-sparc.cc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
freebsd.h Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
hypersparc.md Update copyright years. 2022-01-03 10:42:10 +01:00
leon.md Update copyright years. 2022-01-03 10:42:10 +01:00
leon5.md Update copyright years. 2022-01-03 10:42:10 +01:00
linux.h Update copyright years. 2022-01-03 10:42:10 +01:00
linux64.h Use V8+ default in 32-bit mode on SPARC64/Linux 2022-01-31 09:21:48 +01:00
long-double-switch.opt Update copyright years. 2022-01-03 10:42:10 +01:00
m8.md Update copyright years. 2022-01-03 10:42:10 +01:00
netbsd-elf.h Update copyright years. 2022-01-03 10:42:10 +01:00
niagara.md Update copyright years. 2022-01-03 10:42:10 +01:00
niagara2.md Update copyright years. 2022-01-03 10:42:10 +01:00
niagara4.md Update copyright years. 2022-01-03 10:42:10 +01:00
niagara7.md Update copyright years. 2022-01-03 10:42:10 +01:00
openbsd1-64.h Update copyright years. 2022-01-03 10:42:10 +01:00
openbsd64.h Update copyright years. 2022-01-03 10:42:10 +01:00
predicates.md Update copyright years. 2022-01-03 10:42:10 +01:00
rtemself.h Update copyright years. 2022-01-03 10:42:10 +01:00
sol2.h Update copyright years. 2022-01-03 10:42:10 +01:00
sp-elf.h Update copyright years. 2022-01-03 10:42:10 +01:00
sp64-elf.h Update copyright years. 2022-01-03 10:42:10 +01:00
sparc-c.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
sparc-d.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
sparc-modes.def Update copyright years. 2022-01-03 10:42:10 +01:00
sparc-opts.h Update copyright years. 2022-01-03 10:42:10 +01:00
sparc-passes.def Update copyright years. 2022-01-03 10:42:10 +01:00
sparc-protos.h Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
sparc.cc sparc: Preserve ORIGINAL_REGNO in epilogue_renumber [PR105257] 2022-04-19 18:58:59 +02:00
sparc.h Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
sparc.md Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
sparc.opt Update copyright years. 2022-01-03 10:42:10 +01:00
sparclet.md Update copyright years. 2022-01-03 10:42:10 +01:00
supersparc.md Update copyright years. 2022-01-03 10:42:10 +01:00
sync.md Update copyright years. 2022-01-03 10:42:10 +01:00
sysv4.h Update copyright years. 2022-01-03 10:42:10 +01:00
t-elf Update copyright years. 2022-01-03 10:42:10 +01:00
t-leon Update copyright years. 2022-01-03 10:42:10 +01:00
t-leon3 Update copyright years. 2022-01-03 10:42:10 +01:00
t-linux
t-linux64 Update copyright years. 2022-01-03 10:42:10 +01:00
t-netbsd64
t-rtems Update copyright years. 2022-01-03 10:42:10 +01:00
t-rtems-64 Update copyright years. 2022-01-03 10:42:10 +01:00
t-sol2
t-sparc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
t-vxworks
tso.h Update copyright years. 2022-01-03 10:42:10 +01:00
ultra1_2.md Update copyright years. 2022-01-03 10:42:10 +01:00
ultra3.md Update copyright years. 2022-01-03 10:42:10 +01:00
visintrin.h Update copyright years. 2022-01-03 10:42:10 +01:00
vxworks.h Update copyright years. 2022-01-03 10:42:10 +01:00
x-sparc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00