[llvm] r185040 - SLP: Dont erase instructions during vectorization because it prevents the outerloops from iterating over the instructions.

Nadav Rotem nrotem at apple.com
Wed Jun 26 16:43:24 PDT 2013


Author: nadav
Date: Wed Jun 26 18:43:23 2013
New Revision: 185040

URL: http://llvm.org/viewvc/llvm-project?rev=185040&view=rev
Log:
SLP: Dont erase instructions during vectorization because it prevents the outerloops from iterating over the instructions.

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

Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=185040&r1=185039&r2=185040&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Wed Jun 26 18:43:23 2013
@@ -1258,8 +1258,6 @@ Value *FuncSLP::vectorizeArith(ArrayRef<
   for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
     Value *S = Builder.CreateExtractElement(Vec, Builder.getInt32(i));
     Operands[i]->replaceAllUsesWith(S);
-    Instruction *I = cast<Instruction>(Operands[i]);
-    I->eraseFromParent();
   }
 
   return Vec;





More information about the llvm-commits mailing list