https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119108

--- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Matthew Malcomson from comment #3)
> I only looked into VecSource/5/2, and unfortunately I looked into it on an
> internal setup that compiles slightly differently.
> 
> In that slightly different compilation I noticed that `FindMatchLengthPlain`
> was affected by the patch, and perf pointed to extra branch mispredictions
> on the changed code.  This was particularly noticeable in that different
> compilation since `FindMatchLengthPlain` was not inlined.
> 

I guess that loop condition there could be split to create an early exit.
So it's possible.

> Am currently looking to reproduce that finding with upstream sources so it's
> more useful than hearsay.

Thanks!

the branch mispredictions could be caused by the loop profiles not always being
correct.  You can then get incorrect BB reordering.  We've had patches upstream
for a while now to fix this but no reviews yet.

You can confirm if this is the case by compiling both versions with
-fno-reorder-blocks

Reply via email to