diff --git a/docs/LangRef.html b/docs/LangRef.html
index bc3b40b460e..b469022b762 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -892,9 +892,9 @@ declare signext i8 @returns_signed_char()
noalias
This indicates that the pointer does not alias any global or any other
parameter. The caller is responsible for ensuring that this is the
- case. Additionally, on a function return value noalias indicates
- that the pointer does not alias the return value from other calls of
- itself or other noalias functions.
+ case. On a function return value, noalias additionally indicates
+ that the pointer does not alias any other pointers visible to the
+ caller.
nest
This indicates that the pointer parameter can be excised using the
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index e9c6490ebb7..5b65fb1199c 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -383,9 +383,9 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
if (isIdentifiedObject(O1) && isIdentifiedObject(O2))
return NoAlias;
- // Local allocations can't alias with arguments or noalias functions.
- if ((isa(O1) && (isa(O2) || isNoAliasCall(O2))) ||
- (isa(O2) && (isa(O1) || isNoAliasCall(O1))))
+ // Arguments can't alias with local allocations or noalias calls.
+ if ((isa(O1) && (isa(O2) || isNoAliasCall(O2))) ||
+ (isa(O2) && (isa(O1) || isNoAliasCall(O1))))
return NoAlias;
// Most objects can't alias null.