[PATCH] D35725: [LV] Avoid redundant operations manipulating masks

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 07:38:54 PDT 2017


Ayal created this revision.
Herald added a subscriber: mzolotukhin.

Avoid generating redundant operations when manipulating masks: AND with true, OR with false, compare equal to true. Model all-one masks as a null (no-mask) following the convention for masked gathers and scatters.

These redundant operations get eliminated by subsequent passes. This patch is preparing for a follow-up VPlan patch in which these operations are modeled using recipes.


https://reviews.llvm.org/D35725

Files:
  lib/IR/IRBuilder.cpp
  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: D35725.107671.patch
Type: text/x-patch
Size: 13486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170721/b264f65d/attachment.bin>


More information about the llvm-commits mailing list