[Bug tree-optimization/79547] duplicate strlen calls with same argument not folded
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 16 11:46:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79547
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> + /* Pure functions that return something not based on any object. */
> + case BUILT_IN_STRLEN:
> + /* We don't need to do anything here. No constraints are necessary
> + for the return value and call handling for pure functions is
> + special-cased in the alias oracle. */
> + return true;
> /* Trampolines are special - they set up passing the static
> frame. */
> case BUILT_IN_INIT_TRAMPOLINE:
>
>
> any other similar (pure/const) builtins?
strcmp, strncmp, strcasecmp, strncasecmp, memcmp, strchr, strrchr, index,
rindex?
More information about the Gcc-bugs
mailing list