diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 907cede8e5c..351809ddede 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -477,7 +477,7 @@ determinePointerReadAttrs(Argument *A, // to a operand bundle use, these cannot participate in the optimistic SCC // analysis. Instead, we model the operand bundle uses as arguments in // call to a function external to the SCC. - if (!SCCNodes.count(std::next(F->arg_begin(), UseIndex)) || + if (!SCCNodes.count(&*std::next(F->arg_begin(), UseIndex)) || IsOperandBundleUse) { // The accessors used on CallSite here do the right thing for calls and