@@ -687,8 +687,6 @@ static Type extractVectorElementType(Type type) {
687
687
return vectorType.getElementType ();
688
688
if (auto scalableVectorType = llvm::dyn_cast<LLVMScalableVectorType>(type))
689
689
return scalableVectorType.getElementType ();
690
- if (auto fixedVectorType = llvm::dyn_cast<LLVMFixedVectorType>(type))
691
- return fixedVectorType.getElementType ();
692
690
return type;
693
691
}
694
692
@@ -725,20 +723,19 @@ static void destructureIndices(Type currType, ArrayRef<GEPArg> indices,
725
723
if (rawConstantIndices.size () == 1 || !currType)
726
724
continue ;
727
725
728
- currType =
729
- TypeSwitch<Type, Type>(currType)
730
- .Case <VectorType, LLVMScalableVectorType, LLVMFixedVectorType,
731
- LLVMArrayType>([](auto containerType) {
732
- return containerType.getElementType ();
733
- })
734
- .Case ([&](LLVMStructType structType) -> Type {
735
- int64_t memberIndex = rawConstantIndices.back ();
736
- if (memberIndex >= 0 && static_cast <size_t >(memberIndex) <
737
- structType.getBody ().size ())
738
- return structType.getBody ()[memberIndex];
739
- return nullptr ;
740
- })
741
- .Default (Type (nullptr ));
726
+ currType = TypeSwitch<Type, Type>(currType)
727
+ .Case <VectorType, LLVMScalableVectorType, LLVMArrayType>(
728
+ [](auto containerType) {
729
+ return containerType.getElementType ();
730
+ })
731
+ .Case ([&](LLVMStructType structType) -> Type {
732
+ int64_t memberIndex = rawConstantIndices.back ();
733
+ if (memberIndex >= 0 && static_cast <size_t >(memberIndex) <
734
+ structType.getBody ().size ())
735
+ return structType.getBody ()[memberIndex];
736
+ return nullptr ;
737
+ })
738
+ .Default (Type (nullptr ));
742
739
}
743
740
}
744
741
@@ -839,11 +836,11 @@ verifyStructIndices(Type baseGEPType, unsigned indexPos,
839
836
return verifyStructIndices (elementTypes[gepIndex], indexPos + 1 ,
840
837
indices, emitOpError);
841
838
})
842
- .Case <VectorType, LLVMScalableVectorType, LLVMFixedVectorType,
843
- LLVMArrayType>( [&](auto containerType) -> LogicalResult {
844
- return verifyStructIndices (containerType.getElementType (), indexPos + 1 ,
845
- indices, emitOpError);
846
- })
839
+ .Case <VectorType, LLVMScalableVectorType, LLVMArrayType>(
840
+ [&](auto containerType) -> LogicalResult {
841
+ return verifyStructIndices (containerType.getElementType (),
842
+ indexPos + 1 , indices, emitOpError);
843
+ })
847
844
.Default ([&](auto otherType) -> LogicalResult {
848
845
return emitOpError ()
849
846
<< " type " << otherType << " cannot be indexed (index #"
@@ -3157,16 +3154,14 @@ OpFoldResult LLVM::ZeroOp::fold(FoldAdaptor) {
3157
3154
// ===----------------------------------------------------------------------===//
3158
3155
3159
3156
// / Compute the total number of elements in the given type, also taking into
3160
- // / account nested types. Supported types are `VectorType`, `LLVMArrayType` and
3161
- // / `LLVMFixedVectorType`. Everything else is treated as a scalar.
3157
+ // / account nested types. Supported types are `VectorType` and `LLVMArrayType`.
3158
+ // / Everything else is treated as a scalar.
3162
3159
static int64_t getNumElements (Type t) {
3163
3160
if (auto vecType = dyn_cast<VectorType>(t))
3164
3161
return vecType.getNumElements () * getNumElements (vecType.getElementType ());
3165
3162
if (auto arrayType = dyn_cast<LLVM::LLVMArrayType>(t))
3166
3163
return arrayType.getNumElements () *
3167
3164
getNumElements (arrayType.getElementType ());
3168
- if (auto vecType = dyn_cast<LLVMFixedVectorType>(t))
3169
- return vecType.getNumElements () * getNumElements (vecType.getElementType ());
3170
3165
assert (!isa<LLVM::LLVMScalableVectorType>(t) &&
3171
3166
" number of elements of a scalable vector type is unknown" );
3172
3167
return 1 ;
@@ -3184,8 +3179,6 @@ static bool hasScalableVectorType(Type t) {
3184
3179
}
3185
3180
if (auto arrayType = dyn_cast<LLVM::LLVMArrayType>(t))
3186
3181
return hasScalableVectorType (arrayType.getElementType ());
3187
- if (auto vecType = dyn_cast<LLVMFixedVectorType>(t))
3188
- return hasScalableVectorType (vecType.getElementType ());
3189
3182
return false ;
3190
3183
}
3191
3184
@@ -3265,8 +3258,7 @@ LogicalResult LLVM::ConstantOp::verify() {
3265
3258
<< " scalable vector type requires a splat attribute" ;
3266
3259
return success ();
3267
3260
}
3268
- if (!isa<VectorType, LLVM::LLVMArrayType, LLVM::LLVMFixedVectorType>(
3269
- getType ()))
3261
+ if (!isa<VectorType, LLVM::LLVMArrayType>(getType ()))
3270
3262
return emitOpError () << " expected vector or array type" ;
3271
3263
// The number of elements of the attribute and the type must match.
3272
3264
int64_t attrNumElements;
@@ -3515,8 +3507,7 @@ LogicalResult LLVM::BitcastOp::verify() {
3515
3507
if (!resultType)
3516
3508
return success ();
3517
3509
3518
- auto isVector =
3519
- llvm::IsaPred<VectorType, LLVMScalableVectorType, LLVMFixedVectorType>;
3510
+ auto isVector = llvm::IsaPred<VectorType, LLVMScalableVectorType>;
3520
3511
3521
3512
// Due to bitcast requiring both operands to be of the same size, it is not
3522
3513
// possible for only one of the two to be a pointer of vectors.
@@ -3982,7 +3973,6 @@ void LLVMDialect::initialize() {
3982
3973
3983
3974
// clang-format off
3984
3975
addTypes<LLVMVoidType,
3985
- LLVMPPCFP128Type,
3986
3976
LLVMTokenType,
3987
3977
LLVMLabelType,
3988
3978
LLVMMetadataType>();
0 commit comments