mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-16 14:26:17 +00:00
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
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user