[llvm] r334943 - [VPlan] Fix sanitizer problem with insertBefore.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 06:51:28 PDT 2018


Author: fhahn
Date: Mon Jun 18 06:51:28 2018
New Revision: 334943

URL: http://llvm.org/viewvc/llvm-project?rev=334943&view=rev
Log:
[VPlan] Fix sanitizer problem with insertBefore.

Modified:
    llvm/trunk/lib/Transforms/Vectorize/VPlan.cpp

Modified: llvm/trunk/lib/Transforms/Vectorize/VPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/VPlan.cpp?rev=334943&r1=334942&r2=334943&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/VPlan.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/VPlan.cpp Mon Jun 18 06:51:28 2018
@@ -221,8 +221,8 @@ void VPRegionBlock::execute(VPTransformS
 }
 
 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,




More information about the llvm-commits mailing list