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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The reason why the powerpc64 target expands the call at a different (later)
point than other targets is because the first attempt to expand it ends up in
the "cmpstrsi" pattern where the expansion fails (as does the
expand_strn_compare() function called later).  The later expansion is done with
a modified call expression where the bound originally in SSA_NAME form is
wrapped in a MIN_EXPR.

On targets like x86 the first expansion attempt succeeds (resulting in a call
top strncmp()).  The subsequent call to maybe_warn_nonstring_arg() is made with
the original call expression with the SSA_NAME bound.

Reply via email to