https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91996
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Keywords| |missed-optimization
Last reconfirmed| |2019-10-04
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot
gnu.org
Blocks| |83819
Ever confirmed|0 |1
Target Milestone|--- |10.0
Severity|normal |enhancement
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
This enhancement is what the FIXME in tree-ssa-strlen.c refers to:
static bool
count_nonzero_bytes (tree exp, unsigned HOST_WIDE_INT offset,
unsigned HOST_WIDE_INT nbytes,
unsigned lenrange[3], bool *nulterm,
bool *allnul, bool *allnonnul, ssa_name_limit_t &snlim)
{
int idx = get_stridx (exp);
if (idx > 0)
{
strinfo *si = get_strinfo (idx);
/* FIXME: Handle non-constant lengths in some range. */
if (!si || !tree_fits_shwi_p (si->nonzero_chars))
return false;
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83819
[Bug 83819] [meta-bug] missing strlen optimizations