Hi Aaron, On Thu, Oct 25, 2018 at 09:11:56AM -0500, Aaron Sawdey wrote: > This patch changes the sequence that gcc generates for inline expansion of > strcmp/strncmp using scalar (gpr) instructions. The new sequence is one > instruction shorter and uses cmpb/cmpb/orc./bne which I also have been > told that valgrind should be able to understand as the defined/undefined > info can be propagated and should show that the branch is not based on > any undefined data past the end of the string.
> 2018-10-25 Aaron Sawdey <acsaw...@linux.ibm.com> > > * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to > a shorter sequence with fewer branches. > (emit_final_str_compare_gpr): Ditto. > Index: gcc/config/rs6000/rs6000-string.c > =================================================================== > --- gcc/config/rs6000/rs6000-string.c (revision 265393) > +++ gcc/config/rs6000/rs6000-string.c (working copy) > @@ -259,7 +259,7 @@ > gcc_assert (mode == E_QImode); > emit_move_insn (reg, mem); > break; > - > + What does this change? Both those lines are equal (completely empty), maybe your mailer ate some trailing whitespace (that the patch either added or removed, I can't tell :-) ) The patch is fine however. Thank you! Okay for backport to 8 as well (after some burn-in), it helps solve the valgrind problem. Segher