This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mn10300] use the post-reload compare elimination pass


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]