diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp --- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -254,7 +254,7 @@ // Find the index of the retval to replace with int index = -1; if (ExtractValueInst *EV = dyn_cast(Ins)) - if (EV->hasIndices()) + if (EV->getNumIndices() == 1) index = *EV->idx_begin(); // If this use uses a specific return value, and we have a replacement,