[PATCH] D122836: [SimplifyLibCalls] Fold more memchr calls

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 14:47:53 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:939
+  // is greater than 1.
+  Str = Str.substr(0, MaxLen);
+
----------------
This implicitly truncates MaxLen to 32 bits on 32-bit targets, which is probably not what you want.


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

https://reviews.llvm.org/D122836



More information about the llvm-commits mailing list