[Loop Vectorizer] Support predication of div/rem
authorGil Rapaport <gil.rapaport@intel.com>
Wed, 24 Aug 2016 11:37:57 +0000 (11:37 +0000)
committerGil Rapaport <gil.rapaport@intel.com>
Wed, 24 Aug 2016 11:37:57 +0000 (11:37 +0000)
commit550148b2f662504f77e0b91fb134162c5a176a61
treefe9d6ff971b9c7c900b592c6cec2aa60a9855f6d
parent6392b8d4ce410eaaba08cdbf6c4e261ba1375c7a
[Loop Vectorizer] Support predication of div/rem

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.

Differential Revision: https://reviews.llvm.org/D22918

llvm-svn: 279620
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll [new file with mode: 0644]
llvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll [new file with mode: 0644]
llvm/test/Transforms/LoopVectorize/if-pred-stores.ll