mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 07:24:47 +00:00
Mark strto* as readonly when the endptr is null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64460 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -733,8 +733,10 @@ struct VISIBILITY_HIDDEN StrToOpt : public LibCallOptimization {
|
||||
return 0;
|
||||
|
||||
Value *EndPtr = CI->getOperand(2);
|
||||
if (isa<ConstantPointerNull>(EndPtr))
|
||||
if (isa<ConstantPointerNull>(EndPtr)) {
|
||||
CI->setOnlyReadsMemory();
|
||||
CI->addAttribute(1, Attribute::NoCapture);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user