summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorMichael Zolotukhin <mzolotukhin@apple.com>2016-06-08 21:55:16 +0000
committerMichael Zolotukhin <mzolotukhin@apple.com>2016-06-08 21:55:16 +0000
commit987ab631fad4edbebe3aaa00ba7c04dab1e8be32 (patch)
tree7839a001181c9905816ba2f00a49b122290017b3 /llvm/lib/Transforms
parenta8777c2ef8f38112b5c3b2adce41bf02e8f615f4 (diff)
downloadbcm5719-llvm-987ab631fad4edbebe3aaa00ba7c04dab1e8be32.tar.gz
bcm5719-llvm-987ab631fad4edbebe3aaa00ba7c04dab1e8be32.zip
[SLPVectorizer] Handle GEP with differing constant index types
Summary: This fixes PR27617. Bug description: The SLPVectorizer asserts on encountering GEPs with different index types, such as i8 and i64. The patch includes a simple relaxation of the assert to allow constants being of different types, along with a regression test that will provoke the unrelaxed assert. Reviewers: nadav, mzolotukhin Subscribers: JesperAntonsson, llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D20685 Patch by Jesper Antonsson! llvm-svn: 272206
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 57824434b1b..66d7fc8f1f4 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1014,7 +1014,7 @@ void BoUpSLP::buildTree(ArrayRef<Value *> Roots,
void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth) {
- bool SameTy = getSameType(VL); (void)SameTy;
+ bool SameTy = allConstant(VL) || getSameType(VL); (void)SameTy;
bool isAltShuffle = false;
assert(SameTy && "Invalid types!");
OpenPOWER on IntegriCloud