Re: [PATCH 1/2] x86: Pass a copy of the string length to cmpstrnqi

2020-07-13 Thread Jeff Law via Gcc-patches
On Sun, 2020-05-31 at 16:10 -0700, H.J. Lu via Gcc-patches wrote: > cmpstrnsi expander may pass the actual string length directly to cmpstrnqi > patterns. For cmpstrnsi, one of the strings must be a constant and > expand_builtin_strncmp rewrites the length argument to be the minimum of > the const

[PATCH 1/2] x86: Pass a copy of the string length to cmpstrnqi

2020-05-31 Thread H.J. Lu via Gcc-patches
cmpstrnsi expander may pass the actual string length directly to cmpstrnqi patterns. For cmpstrnsi, one of the strings must be a constant and expand_builtin_strncmp rewrites the length argument to be the minimum of the const string length and the actual string length. But it is not the case for c