This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
reload vs adds with clobbers
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 30 May 2003 15:59:12 -0400
- Subject: reload vs adds with clobbers
In gen_reload (reload1.c) there's a chunk of code that creates an add
insn without going through the usual expanders:
line 7471:
if (op0 != XEXP (in, 0) || op1 != XEXP (in, 1))
in = gen_rtx_PLUS (GET_MODE (in), op0, op1);
insn = emit_insn (gen_rtx_SET (VOIDmode, out, in));
code = recog_memoized (insn);
Unfortunately, for xstormy16, the add instruction has a clobber (it
clobbers the carry), so it doesn't match. The fallthrough code (for
above) tries to expand the add into two insns, but that totally blows
up in this case (adding a constant to a register) due to its
assumptions about what would fail the above recog.
What's the right way to address this problem?