[llvm-commits] [llvm] r159173 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll

Nuno Lopes nunoplopes at sapo.pt
Mon Jun 25 15:55:50 PDT 2012


Author: nlopes
Date: Mon Jun 25 17:55:50 2012
New Revision: 159173

URL: http://llvm.org/viewvc/llvm-project?rev=159173&view=rev
Log:
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..

Modified:
    llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
    llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll

Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=159173&r1=159172&r2=159173&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Jun 25 17:55:50 2012
@@ -1942,7 +1942,6 @@
           !FTy->getReturnType()->isPointerTy())
         return;
       setDoesNotThrow(F);
-      setDoesNotAlias(F, 0);
       setDoesNotCapture(F, 1);
     } else if (Name == "read") {
       if (FTy->getNumParams() != 3 ||

Modified: llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll?rev=159173&r1=159172&r2=159173&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll Mon Jun 25 17:55:50 2012
@@ -1,5 +1,5 @@
 ; 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 nounwind %t | count 3
 ; RUN: grep readonly %t | count 1





More information about the llvm-commits mailing list