diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1071,7 +1071,8 @@ SmallSetVector NAPtrArgs; for (const Value *V : PtrArgs) { SmallVector Objects; - getUnderlyingObjects(V, Objects, /* LI = */ nullptr); + getUnderlyingObjects(V, Objects, /* LI = */ nullptr, + /* MaxLookup = */ 0); for (const Value *O : Objects) ObjSet.insert(O);