[PATCH] D67986: [InstCombine] snprintf (d, size, "%s", s) -> memccpy (d, s, '\0', size - 1), d[size - 1] = 0

Joerg Sonnenberger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 16:24:37 PDT 2019


joerg added a comment.

I'd make the argument that it should be strlcpy if present. That covers a lot of existing systems too. I'm not sure this optimisation should be done for freestanding mode though.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67986/new/

https://reviews.llvm.org/D67986





More information about the llvm-commits mailing list