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

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 10:27:17 PDT 2019


nickdesaulniers added a comment.

It sounds like memccpy is part of C20.  Can we not do this transform unless `LangOpt` says we're C20 or greater?  Otherwise the Linux kernel doesn't implement this routine.


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

https://reviews.llvm.org/D67986





More information about the llvm-commits mailing list