[PATCH] D129224: [InstCombine] Fold strtoul and strtoull and avoid PR #56293
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 14:51:08 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:2588
Value *LibCallSimplifier::optimizeAtoi(CallInst *CI, IRBuilderBase &B) {
+ CI->addParamAttr(0, Attribute::NoCapture);
+
----------------
This call should still get dropped (the other one is fine, as it is conditional).
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:2603
+ // With a null EndPtr, this function won't capture the main argument.
+ // It would be readonly too, except that it still may write to errno.
+ CI->addParamAttr(0, Attribute::NoCapture);
----------------
That sounds like the parameter can still be readonly, just not the function.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129224/new/
https://reviews.llvm.org/D129224
More information about the llvm-commits
mailing list