diff options
author | Tim Northover <tnorthover@apple.com> | 2014-04-02 14:39:02 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-04-02 14:39:02 +0000 |
commit | 24e78e0125dbdc0667fc261175d1148f74612783 (patch) | |
tree | f7d15ca8c0176a1a5d1f7582c2a5aa032f1febf2 /lib/Transforms/Vectorize | |
parent | 3844cadc9aac3cef059434f2f34024c6cf6573de (diff) | |
download | llvm-24e78e0125dbdc0667fc261175d1148f74612783.tar.gz llvm-24e78e0125dbdc0667fc261175d1148f74612783.tar.bz2 llvm-24e78e0125dbdc0667fc261175d1148f74612783.tar.xz |
SLPVectorizer: compare entire intrinsic for SLP compatibility.
Some Intrinsics are overloaded to the extent that return type equality (all
that's been checked up to now) does not guarantee that the arguments are the
same. In these cases SLP vectorizer should not recurse into the operands, which
can be achieved by comparing them as "Function *" rather than simply the ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r-- | lib/Transforms/Vectorize/SLPVectorizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp index f6b5b12274..ee322279df 100644 --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -955,11 +955,11 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth) { return; } - Intrinsic::ID ID = II->getIntrinsicID(); + Function *Int = II->getCalledFunction(); for (unsigned i = 1, e = VL.size(); i != e; ++i) { IntrinsicInst *II2 = dyn_cast<IntrinsicInst>(VL[i]); - if (!II2 || II2->getIntrinsicID() != ID) { + if (!II2 || II2->getCalledFunction() != Int) { newTreeEntry(VL, false); DEBUG(dbgs() << "SLP: mismatched calls:" << *II << "!=" << *VL[i] << "\n"); |