[PATCH] D36113: [Loop Vectorize] Vectorize Loops with Backward Dependence

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 07:56:56 PDT 2017


hiraditya added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorizePred.cpp:114
+  bool reordered = false;
+  int moved = 1;
+  BasicBlock::iterator currInstIter = StoreInstIter;
----------------
We can make `moved` a bool


================
Comment at: lib/Transforms/Vectorize/LoopVectorizePred.cpp:168
+
+          if (StoreInst *StInst = dyn_cast<StoreInst>(&*it)) {
+            if (StInst == St)
----------------
I think we do not need a dyn_cast here, we can just compare the instructions.


https://reviews.llvm.org/D36113





More information about the llvm-commits mailing list