From 3bcff3662c74980832c7ca8fe3436cfa32899e5a Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 18 Jun 2018 13:51:28 +0000 Subject: [VPlan] Fix sanitizer problem with insertBefore. llvm-svn: 334943 --- llvm/lib/Transforms/Vectorize/VPlan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Vectorize/VPlan.cpp') diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp index 7d07ae09902..ea9ad199907 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp @@ -221,8 +221,8 @@ void VPRegionBlock::execute(VPTransformState *State) { } void VPRecipeBase::insertBefore(VPRecipeBase *InsertPos) { - InsertPos->getParent()->getRecipeList().insert(InsertPos->getIterator(), - this); + Parent = InsertPos->getParent(); + Parent->getRecipeList().insert(InsertPos->getIterator(), this); } void VPInstruction::generateInstruction(VPTransformState &State, -- cgit v1.2.3