[PATCH] D45418: [SimplifyLibcalls] Atoi, strtol replacements

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 9 10:48:18 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1693
+
+  if (!match(CI->getArgOperand(1), m_Zero())) {
+    return nullptr;
----------------
1. elide `{}`
2. this is clearly broken. you check the same operand here and in the next `if()`.
I'm guessing you want to check the third operand here, not the second one.
And do add the test.


https://reviews.llvm.org/D45418





More information about the llvm-commits mailing list