Skip to content
Snippets Groups Projects
Commit 3991b2f6 authored by Hans-Peter Nilsson's avatar Hans-Peter Nilsson Committed by Hans-Peter Nilsson
Browse files

reload_cse_move2add: Handle trivial single_set:s

The reload_cse_move2add part of "postreload" handled only
insns whose PATTERN was a SET.  That excludes insns that
e.g. clobber a flags register, which it does only for
"simplicity".  The patch extends the "simplicity" to most
single_set insns.  For a subset of those insns there's still
an assumption; that the single_set of a PARALLEL insn is the
first element in the PARALLEL.  If the assumption fails,
it's no biggie; the optimization just isn't performed.
Don't let the name deceive you, this optimization doesn't
hit often, but as often (or as rarely) for LRA as for reload
at least on e.g. cris-elf where the biggest effect was seen
in reducing repeated addresses in copies from fixed-address
arrays, like in gcc.c-torture/compile/pr78694.c.

	* postreload.cc (move2add_use_add2_insn): Handle
	trivial single_sets.  Rename variable PAT to SET.
	(move2add_use_add3_insn, reload_cse_move2add): Similar.
parent 8bdfa8a6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment