mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 21:38:19 +00:00
SLPVectorizer: Only vectorize intrinsics whose operands are widened equally
The vectorizer only knows how to vectorize intrinics by widening all operands by the same factor. Patch by Tyler Nowicki! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -41,6 +41,7 @@
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Transforms/Utils/VectorUtils.h"
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
@ -949,7 +950,9 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth) {
|
||||
case Instruction::Call: {
|
||||
// Check if the calls are all to the same vectorizable intrinsic.
|
||||
IntrinsicInst *II = dyn_cast<IntrinsicInst>(VL[0]);
|
||||
if (II==NULL) {
|
||||
Intrinsic::ID ID = II ? II->getIntrinsicID() : Intrinsic::not_intrinsic;
|
||||
|
||||
if (!isTriviallyVectorizable(ID)) {
|
||||
newTreeEntry(VL, false);
|
||||
DEBUG(dbgs() << "SLP: Non-vectorizable call.\n");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user