diff options
author | Sriram Murali <sriram87@gmail.com> | 2013-10-10 20:24:53 +0000 |
---|---|---|
committer | Sriram Murali <sriram87@gmail.com> | 2013-10-10 20:24:53 +0000 |
commit | 4d91232df1f385f0f89c767f1d297b1088f26f67 (patch) | |
tree | 75001d29d628e253e266f410fc9a256d165fe1e1 /include | |
parent | 828c9e73baacf0b0f68932718659681223b6b3c4 (diff) | |
download | external_llvm-4d91232df1f385f0f89c767f1d297b1088f26f67.zip external_llvm-4d91232df1f385f0f89c767f1d297b1088f26f67.tar.gz external_llvm-4d91232df1f385f0f89c767f1d297b1088f26f67.tar.bz2 |
test commit
- fix comments on vector type legalization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index cd95a73..0130e07 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -1473,10 +1473,12 @@ public: if (NumElts == 1) return LegalizeKind(TypeScalarizeVector, EltVT); - // Try to widen vector elements until a legal type is found. + // Try to widen vector elements until the element type is a power of two and + // promote it to a legal type later on, for example: + // <3 x i8> -> <4 x i8> -> <4 x i32> if (EltVT.isInteger()) { // Vectors with a number of elements that is not a power of two are always - // widened, for example <3 x float> -> <4 x float>. + // widened, for example <3 x i8> -> <4 x i8>. if (!VT.isPow2VectorType()) { NumElts = (unsigned)NextPowerOf2(NumElts); EVT NVT = EVT::getVectorVT(Context, EltVT, NumElts); |