[PATCH] D22918: [Loop Vectorizer] Support predication of div/rem

Gil Rapaport via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 08:43:09 PDT 2016


gilr created this revision.
gilr added reviewers: mkuper, jmolloy.
gilr added subscribers: llvm-commits, Ayal, delena.
Herald added a subscriber: mzolotukhin.

div/rem instructions in basic blocks that require predication currently prevent vectorization. This patch extends the existing mechanism for predicating stores to handle other instructions and leverages it to predicate divs and rems.

The generated vector extracts and inserts are now moved into the predicated block (reflected in the cost model for scalarization).

https://reviews.llvm.org/D22918

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/if-pred-non-void.ll
  test/Transforms/LoopVectorize/if-pred-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22918.65934.patch
Type: text/x-patch
Size: 20507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160728/1346d006/attachment.bin>


More information about the llvm-commits mailing list