On Wed, Nov 16, 2016 at 8:22 PM, Aaron Sawdey
<acsaw...@linux.vnet.ibm.com> wrote:
> This patch adds a test to the cmpstrnsi pattern in i386.md so that it
> will bail out (FAIL) if neither of the strings is a constant string. It
> can only work as a proper strncmp if the length is not longer than both
> of the strings. This change is required if expand_builtin_strncmp is
> going to try expansion of strncmp when neither string argument is
> constant. I've also changed the pattern to indicate that operand 3 may
> be clobbered (if it happens to be in cx already).
>
> 2016-11-16  Aaron Sawdey  <acsaw...@linux.vnet.ibm.com>
>
>         * config/i386/i386.md (cmpstrnsi): New test to bail out if neither
>         string input is a string constant.  Clobber length argument.

Please leave out use -> clobber change. We never reach pattern
generation, and expanders only look at the predicate of operand 3.

OK witth the above change.

Uros.

Reply via email to