mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Add support to BBVectorize for vectorizing selects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -95,6 +95,10 @@ static cl::opt<bool>
|
||||
NoFMA("bb-vectorize-no-fma", cl::init(false), cl::Hidden,
|
||||
cl::desc("Don't try to vectorize the fused-multiply-add intrinsic"));
|
||||
|
||||
static cl::opt<bool>
|
||||
NoSelect("bb-vectorize-no-select", cl::init(false), cl::Hidden,
|
||||
cl::desc("Don't try to vectorize select instructions"));
|
||||
|
||||
static cl::opt<bool>
|
||||
NoMemOps("bb-vectorize-no-mem-ops", cl::init(false), cl::Hidden,
|
||||
cl::desc("Don't try to vectorize loads and stores"));
|
||||
@@ -552,6 +556,9 @@ namespace {
|
||||
Type *DestTy = C->getDestTy();
|
||||
if (!DestTy->isSingleValueType() || DestTy->isPointerTy())
|
||||
return false;
|
||||
} else if (isa<SelectInst>(I)) {
|
||||
if (!Config.VectorizeSelect)
|
||||
return false;
|
||||
} else if (!(I->isBinaryOp() || isa<ShuffleVectorInst>(I) ||
|
||||
isa<ExtractElementInst>(I) || isa<InsertElementInst>(I))) {
|
||||
return false;
|
||||
@@ -1894,6 +1901,7 @@ VectorizeConfig::VectorizeConfig() {
|
||||
VectorizeCasts = !::NoCasts;
|
||||
VectorizeMath = !::NoMath;
|
||||
VectorizeFMA = !::NoFMA;
|
||||
VectorizeSelect = !::NoSelect;
|
||||
VectorizeMemOps = !::NoMemOps;
|
||||
AlignedOnly = ::AlignedOnly;
|
||||
ReqChainDepth= ::ReqChainDepth;
|
||||
|
Reference in New Issue
Block a user