[PATCH] D26555: [LV] Keep predicated instructions in the same block

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 12:26:24 PST 2016


mssimpso created this revision.
mssimpso added reviewers: mkuper, gilr.
mssimpso added subscribers: llvm-commits, mcrosier.
Herald added a subscriber: mzolotukhin.

When predicating scalar instructions, we previously placed every instruction that requires predication into its own block, regardless of whether multiple instructions may have occurred in the same block in the original loop. For example, if a division and a store from the same block in the original loop require predication, we created a new basic block for each of the 2 x VF x UF scalar instructions in the vector loop.

This patch modifies code generation for instruction predication such that we keep the predicated instructions in the same block after vectorization if they were in the same block before vectorization.


https://reviews.llvm.org/D26555

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/AArch64/predication_costs.ll
  test/Transforms/LoopVectorize/if-pred-non-void.ll
  test/Transforms/LoopVectorize/induction.ll
  test/Transforms/LoopVectorize/interleaved-accesses-pred-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26555.77651.patch
Type: text/x-patch
Size: 35184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161111/13b4d812/attachment.bin>


More information about the llvm-commits mailing list