This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [mn10300] use the post-reload compare elimination pass
- From: Richard Henderson <rth at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, ebotcazou at libertysurf dot fr, Nick Clifton <nickc at redhat dot com>
- Date: Tue, 30 Nov 2010 13:29:20 -0800
- Subject: Re: [mn10300] use the post-reload compare elimination pass
- References: <4CF4399B.2090403@redhat.com> <4CF43D32.9050001@redhat.com> <4CF52D84.1060105@redhat.com>
On 11/30/2010 08:59 AM, Jeff Law wrote:
> My backend-fu is a bit rusty. For a comparison operator, we don't use modes, right?
Only for setcc insns.
> It appears that the old cbranchsi4_post_reload had CCmode when it generated the comparison:
>
> - emit_jump_insn (gen_integer_conditional_branch
> - (gen_rtx_fmt_ee (GET_CODE (operands[3]),
> - CCmode,
> - gen_rtx_REG (CCmode, CC_REG),
> - const0_rtx),
> - operands[2]));
>
> The new code in split_cbranch uses VOIDmode:
Yep. We had been adding the CCmode where it wasn't desired.
> You need to update the comment before the cmpsi pattern. I think the
> first hunk of the comment shoudl probably remain unchanged, the
> second part however, needs updating.
Yeah, looking at it closer, I think a better way to handle this is *not*
to use matching constraints at all, but simply to do an rtx_equal_p test
inside the output template.
> Is there some reason why you took out the ZERO_EXTRACT cost from mn10300_rtx_costs?
btst is no longer represented with a ZERO_EXTRACT, so that code is dead.
> You eliminated the negsi2 expander, was that on purpose? Presumably
> it's handled generically these days? (if not, it should)?
Yes, generic code will generate "op0 = 0 - op1".
r~