Fix a thinko that Duncan spotted.
authorDan Gohman <gohman@apple.com>
Mon, 8 Nov 2010 19:24:47 +0000 (19:24 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 8 Nov 2010 19:24:47 +0000 (19:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118430 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/FunctionAttrs.cpp

index c4978b4df56ee67a00485c4d41ef37daeb610180..a2173933efb81c814c321bc7bbebc02d711b85bd 100644 (file)
@@ -145,7 +145,7 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) {
               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;
             }