summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorMatthew Simpson <mssimpso@codeaurora.org>2017-02-10 16:15:26 +0000
committerMatthew Simpson <mssimpso@codeaurora.org>2017-02-10 16:15:26 +0000
commitdf124a756983c358185b00aab21873bef4fbe545 (patch)
tree98f14eeb8c798beb962d0afc0d6e9f9cf0b27da7 /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
parent6ea21852afbb5cc1521faf5f66ffc25191d92d2b (diff)
downloadbcm5719-llvm-df124a756983c358185b00aab21873bef4fbe545.tar.gz
bcm5719-llvm-df124a756983c358185b00aab21873bef4fbe545.zip
[LV] Remove type restriction for vector phi creation
We previously only created a vector phi node for an induction variable if its type matched the type of the canonical induction variable. Differential Revision: https://reviews.llvm.org/D29776 llvm-svn: 294755
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 02a6f3f3eff..59e7f38cdb8 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2421,8 +2421,7 @@ void InnerLoopVectorizer::widenIntInduction(PHINode *IV, TruncInst *Trunc) {
// Try to create a new independent vector induction variable. If we can't
// create the phi node, we will splat the scalar induction variable in each
// loop iteration.
- if (VF > 1 && IV->getType() == Induction->getType() && Step &&
- !shouldScalarizeInstruction(EntryVal)) {
+ if (VF > 1 && Step && !shouldScalarizeInstruction(EntryVal)) {
createVectorIntInductionPHI(ID, EntryVal);
VectorizedIV = true;
}
OpenPOWER on IntegriCloud