https://bugs.kde.org/show_bug.cgi?id=386945
Aaron Sawdey <acsaw...@linux.vnet.ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |acsaw...@linux.vnet.ibm.com --- Comment #13 from Aaron Sawdey <acsaw...@linux.vnet.ibm.com> --- The unaligned ldbrx are expected -- there is not much penalty for doing this on power7/power8 so it's faster for these short comparisons to just do it possibly unaligned rather than have the extra branches and code to do a partial comparison to get one/both arguments aligned. Targeting power8 we can generate overlapping unaligned ldbrx to avoid having to do multiple smaller loads or a shift/mask to compare something less than a doubleword at the end. Power7 doesn't like that so there we do the shift/mask. Doing the full doubleword compare first means that in the equality case I can check for zero byte with just one cmpb. In the case where the doublewords are not equal then two cmpb are needed, one to compare the string data and the other to check just one of them for a zero byte. The code that generates this is in expand_strn_compare() in rs6000.c (gcc 7) or rs6000-string.c (gcc 8). -- You are receiving this mail because: You are watching all bug changes.