diff --git a/llvm/lib/Transforms/Yk/ControlPoint.cpp b/llvm/lib/Transforms/Yk/ControlPoint.cpp index 7d2a12ebb0ff70..88b651e02fc0b8 100644 --- a/llvm/lib/Transforms/Yk/ControlPoint.cpp +++ b/llvm/lib/Transforms/Yk/ControlPoint.cpp @@ -193,7 +193,8 @@ class YkControlPoint : public ModulePass { // Get live variables. LivenessAnalysis LA(Caller); - auto Lives = LA.getLiveVarsBefore(OldCtrlPointCall); + auto Lives = + LA.getLiveVarsBefore(OldCtrlPointCall->getNextNonDebugInstruction()); Value *SMID = ConstantInt::get(Type::getInt64Ty(Context), CPStackMapID); Value *Shadow = ConstantInt::get(Type::getInt32Ty(Context), CPShadow);