[PATCH] D12476: [LV] Refactor all runtime check emissions into helper functions.

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 10:11:20 PDT 2015


jmolloy added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2694-2695
@@ +2693,4 @@
+    L->getParentLoop()->addBasicBlockToLoop(NewBB, *LI);
+  ReplaceInstWithInst(BB->getTerminator(),
+                      BranchInst::Create(Bypass, NewBB, CheckMinIters));
+  LoopBypassBlocks.push_back(BB);
----------------
mzolotukhin wrote:
> You could probably use `CmpInst::Create` as in the original code here, to make this path purely NFC, and then change `CmpInst::Create` to `Builder.CreateICmpULT` in a separate patch. But it's up to you - I'm ok with both options.
> And again, I recommend to verify that no unwanted changed sneaked in by comparing IR of some tests (I believe Adam did something like this when he worked on LAA).
That makes sense. I've checked the IR output of all tests in the LoopVectorize/ directory and the only diffs (apart from changes in unique variable names) are to do with constant folding.

I'll commit this as two separate patches.


Repository:
  rL LLVM

http://reviews.llvm.org/D12476





More information about the llvm-commits mailing list