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 | 670df3d937a632dd4ddf3092d23789ba79c7efa8 (patch) | |
tree | 38187a118920969232598f210080d422a96975ba /llvm/lib/Transforms | |
parent | ebd37ab38279f09d36a8c317363e48ecaf5f13c1 (diff) | |
download | bcm5719-llvm-670df3d937a632dd4ddf3092d23789ba79c7efa8.tar.gz bcm5719-llvm-670df3d937a632dd4ddf3092d23789ba79c7efa8.zip |
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.
llvm-svn: 205424
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index f6b5b122742..ee322279df3 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/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"); |