Fix a thinko that Duncan spotted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118430 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp
index c4978b4..a217393 100644
--- a/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -145,7 +145,7 @@
               AliasAnalysis::Location Loc(Arg,
                                           AliasAnalysis::UnknownSize,
                                           I->getMetadata(LLVMContext::MD_tbaa));
-              if (!AA->pointsToConstantMemory(Arg, /*OrLocal=*/true))
+              if (!AA->pointsToConstantMemory(Loc, /*OrLocal=*/true))
                 // Writes memory.  Just give up.
                 return false;
             }