revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok...
authorNuno Lopes <nunoplopes@sapo.pt>
Mon, 25 Jun 2012 23:26:10 +0000 (23:26 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Mon, 25 Jun 2012 23:26:10 +0000 (23:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159175 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/SimplifyLibCalls.cpp
test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll

index 1100d6dd77eb10a80e4641a267ae8714d588ee81..99b05389b2b494e080ae256f0b85aa3818efd116 100644 (file)
@@ -1942,6 +1942,7 @@ void SimplifyLibCalls::inferPrototypeAttributes(Function &F) {
           !FTy->getReturnType()->isPointerTy())
         return;
       setDoesNotThrow(F);
+      setDoesNotAlias(F, 0);
       setDoesNotCapture(F, 1);
     } else if (Name == "read") {
       if (FTy->getNumParams() != 3 ||
index d557484f2a8790e470c6f1b4d7a706c735fa7155..73eb05b05e346ecb752b664050022c55fa42c860 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -simplify-libcalls -S > %t
-; RUN: grep noalias %t | count 1
+; RUN: grep noalias %t | count 2
 ; RUN: grep nocapture %t | count 3
 ; RUN: grep nounwind %t | count 3
 ; RUN: grep readonly %t | count 1