mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Allow controlling vectorization of boolean values separately from other integer types.
These are used as the result of comparisons, and often handled differently from larger integer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159111 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -76,6 +76,10 @@ MaxCandPairsForCycleCheck("bb-vectorize-max-cycle-check-pairs", cl::init(200),
|
||||
cl::Hidden, cl::desc("The maximum number of candidate pairs with which to use"
|
||||
" a full cycle check"));
|
||||
|
||||
static cl::opt<bool>
|
||||
NoBools("bb-vectorize-no-bools", cl::init(false), cl::Hidden,
|
||||
cl::desc("Don't try to vectorize boolean (i1) values"));
|
||||
|
||||
static cl::opt<bool>
|
||||
NoInts("bb-vectorize-no-ints", cl::init(false), cl::Hidden,
|
||||
cl::desc("Don't try to vectorize integer values"));
|
||||
@@ -614,10 +618,15 @@ namespace {
|
||||
!(VectorType::isValidElementType(T2) || T2->isVectorTy()))
|
||||
return false;
|
||||
|
||||
if (!Config.VectorizeInts
|
||||
&& (T1->isIntOrIntVectorTy() || T2->isIntOrIntVectorTy()))
|
||||
return false;
|
||||
|
||||
if (T1->getScalarSizeInBits() == 1 && T2->getScalarSizeInBits() == 1) {
|
||||
if (!Config.VectorizeBools)
|
||||
return false;
|
||||
} else {
|
||||
if (!Config.VectorizeInts
|
||||
&& (T1->isIntOrIntVectorTy() || T2->isIntOrIntVectorTy()))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Config.VectorizeFloats
|
||||
&& (T1->isFPOrFPVectorTy() || T2->isFPOrFPVectorTy()))
|
||||
return false;
|
||||
@@ -1990,6 +1999,7 @@ llvm::vectorizeBasicBlock(Pass *P, BasicBlock &BB, const VectorizeConfig &C) {
|
||||
//===----------------------------------------------------------------------===//
|
||||
VectorizeConfig::VectorizeConfig() {
|
||||
VectorBits = ::VectorBits;
|
||||
VectorizeBools = !::NoBools;
|
||||
VectorizeInts = !::NoInts;
|
||||
VectorizeFloats = !::NoFloats;
|
||||
VectorizePointers = !::NoPointers;
|
||||
|
Reference in New Issue
Block a user