mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
do not set realloc() as NotAlias, since it can return the same pointer. This whole thing should be upgraded to use the MemoryBuiltin interface anyway..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1942,7 +1942,6 @@ void SimplifyLibCalls::inferPrototypeAttributes(Function &F) {
|
|||||||
!FTy->getReturnType()->isPointerTy())
|
!FTy->getReturnType()->isPointerTy())
|
||||||
return;
|
return;
|
||||||
setDoesNotThrow(F);
|
setDoesNotThrow(F);
|
||||||
setDoesNotAlias(F, 0);
|
|
||||||
setDoesNotCapture(F, 1);
|
setDoesNotCapture(F, 1);
|
||||||
} else if (Name == "read") {
|
} else if (Name == "read") {
|
||||||
if (FTy->getNumParams() != 3 ||
|
if (FTy->getNumParams() != 3 ||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: opt < %s -simplify-libcalls -S > %t
|
; RUN: opt < %s -simplify-libcalls -S > %t
|
||||||
; RUN: grep noalias %t | count 2
|
; RUN: grep noalias %t | count 1
|
||||||
; RUN: grep nocapture %t | count 3
|
; RUN: grep nocapture %t | count 3
|
||||||
; RUN: grep nounwind %t | count 3
|
; RUN: grep nounwind %t | count 3
|
||||||
; RUN: grep readonly %t | count 1
|
; RUN: grep readonly %t | count 1
|
||||||
|
Reference in New Issue
Block a user