Re: [PATCH][SH] Check for 0 length with inlined strnlen builtin

2015-01-07 Thread Oleg Endo
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

Re: [PATCH][SH] Check for 0 length with inlined strnlen builtin

2015-01-06 Thread Christian Bruel
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 ?). Cheers Christian 2015-01-08 Christian B

Re: [PATCH][SH] Check for 0 length with inlined strnlen builtin

2015-01-06 Thread Oleg Endo
On Tue, 2015-01-06 at 10:28 +0100, Christian Bruel wrote: > Hello, > > We should not enter the first iteration when length is 0. Testcase > attached. Difficult to reduce because register allocation generated > accidentally the correct return value. > > testsuite OK > > OK for 4.9 and trunk ?

[PATCH][SH] Check for 0 length with inlined strnlen builtin

2015-01-06 Thread Christian Bruel
Hello, We should not enter the first iteration when length is 0. Testcase attached. Difficult to reduce because register allocation generated accidentally the correct return value. testsuite OK OK for 4.9 and trunk ? Christian 2015-01-08 Christian Bruel PR target/64507 * config/sh/sh