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: [PATCH][SH] Check for 0 length with inlined strnlen builtin


On Tue, 2015-01-06 at 13:13 +0100, Christian Bruel wrote:
> > Please use 'gen_cmpeqsi_t (len, const0_rtx)' for comparing a value
> > against zero instead of the bit test insn.
> 
> OK, also then OK to replace the other occurrences of the idiom for 
> coding consistency ? (not sure if I could commit this as obvious ?).

In the end the same "tst reg,reg" instruction will be generated, but
with one reg operand instead of two.  It might have some impact on the
register allocation in some cases.  If it passes testing, it's OK I
think.

Cheers,
Oleg


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