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]

Re: Old patch: combine.c/i386.md tweaks to improve strcmp() builtin


On Sat, 30 Sep 2000, Zack Weinberg wrote:

> This is an old patch which we never finished discussing.  Its purpose
> is to improve the code generated by the x86 back end for strcmp.

This is something I'd like to see solved.  I ran into similar issues
with the combiner a while ago when I tried to replace STRICT_LOW_PART
with something else.

> 	* combine.c (try_combine): Remove redundant test.

This one is obviously OK.

> 	(use_crosses_set_p): If the last set has been deleted, it
> 	doesn't count.

I don't think this is correct.  Consider a case where you have two
sets with cuids > from_cuid; only the second one is in reg_last_set,
and if it's deleted, you'll end up erroneously returning 0.
Why is there an insn with INSN_DELETED_P set anyway?

We could try changing use_crosses_set to do a walk of the insns in between.
That's more expensive, but we may be able to get better results, esp. for
MEMs (it looks like the function expects all MEMs to alias).

> 	* i386.md (*cc_noop_move, *pc_noop_move): Dummy insns to help
> 	combine.

I'd prefer to fix combine...


Bernd


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