PR tree-optimization/90626
gcc/ChangeLog:
* tree-ssa-strlen.c (strxcmp_unequal): Fix typos.
From-SVN: r272487
2019-06-19 Martin Sebor <msebor@redhat.com>
+ PR tree-optimization/90626
+ * tree-ssa-strlen.c (strxcmp_unequal): Fix typos.
+
PR tree-optimization/90626
* tree-ssa-strlen.c (strxcmp_unequal): New function.
(handle_builtin_string_cmp): Call it.
if (idx2 < 0)
{
len2 = ~idx2;
- nulterm1 = true;
+ nulterm2 = true;
}
else if (strinfo *si = get_strinfo (idx2))
{
if (len2 > n)
len2 = n;
- if (len1 != len2 && (nulterm1 || nulterm2))
+ if ((len1 < len2 && nulterm1)
+ || (len2 < len1 && nulterm2))
/* The string lengths are definitely unequal and the result can
be folded to one (since it's used for comparison with zero). */
return true;