Patch: Fix register elimination for toplevel match_parallels
Bernd Schmidt
bernds@codesourcery.com
Wed Mar 24 22:34:00 GMT 2010
I found a number of bugs while testing an ARM patch that rewrites the
ldm/stm peepholes.
In eliminate_regs_in_insn, we
substitute new operands in the insn
create a copy (new_body) of the insn's body (old_body)
set the insn's PATTERN to new_body
replace the subtituted operands with their original values
The last step ensures that old_body returns to its unchanged form.
However, if one of the operands' location is &PATTERN (insn), as can
happen with a top-level match_parallel, we'll also undo the replacement
of new_body for the pattern, which later confuses find_reloads.
Fixed by only undoing substitutions for operands that aren't the whole
pattern. Bootstrapped and regression tested on i686-linux, together
with some other fixes. Ok?
Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p2-elim.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100324/b428190b/attachment.ksh>
More information about the Gcc-patches
mailing list