@@ -686,8 +686,6 @@ static Type extractVectorElementType(Type type) {
686
686
return vectorType.getElementType ();
687
687
if (auto scalableVectorType = llvm::dyn_cast<LLVMScalableVectorType>(type))
688
688
return scalableVectorType.getElementType ();
689
- if (auto fixedVectorType = llvm::dyn_cast<LLVMFixedVectorType>(type))
690
- return fixedVectorType.getElementType ();
691
689
return type;
692
690
}
693
691
@@ -724,20 +722,19 @@ static void destructureIndices(Type currType, ArrayRef<GEPArg> indices,
724
722
if (rawConstantIndices.size () == 1 || !currType)
725
723
continue ;
726
724
727
- currType =
728
- TypeSwitch<Type, Type>(currType)
729
- .Case <VectorType, LLVMScalableVectorType, LLVMFixedVectorType,
730
- LLVMArrayType>([](auto containerType) {
731
- return containerType.getElementType ();
732
- })
733
- .Case ([&](LLVMStructType structType) -> Type {
734
- int64_t memberIndex = rawConstantIndices.back ();
735
- if (memberIndex >= 0 && static_cast <size_t >(memberIndex) <
736
- structType.getBody ().size ())
737
- return structType.getBody ()[memberIndex];
738
- return nullptr ;
739
- })
740
- .Default (Type (nullptr ));
725
+ currType = TypeSwitch<Type, Type>(currType)
726
+ .Case <VectorType, LLVMScalableVectorType, LLVMArrayType>(
727
+ [](auto containerType) {
728
+ return containerType.getElementType ();
729
+ })
730
+ .Case ([&](LLVMStructType structType) -> Type {
731
+ int64_t memberIndex = rawConstantIndices.back ();
732
+ if (memberIndex >= 0 && static_cast <size_t >(memberIndex) <
733
+ structType.getBody ().size ())
734
+ return structType.getBody ()[memberIndex];
735
+ return nullptr ;
736
+ })
737
+ .Default (Type (nullptr ));
741
738
}
742
739
}
743
740
@@ -838,11 +835,11 @@ verifyStructIndices(Type baseGEPType, unsigned indexPos,
838
835
return verifyStructIndices (elementTypes[gepIndex], indexPos + 1 ,
839
836
indices, emitOpError);
840
837
})
841
- .Case <VectorType, LLVMScalableVectorType, LLVMFixedVectorType,
842
- LLVMArrayType>( [&](auto containerType) -> LogicalResult {
843
- return verifyStructIndices (containerType.getElementType (), indexPos + 1 ,
844
- indices, emitOpError);
845
- })
838
+ .Case <VectorType, LLVMScalableVectorType, LLVMArrayType>(
839
+ [&](auto containerType) -> LogicalResult {
840
+ return verifyStructIndices (containerType.getElementType (),
841
+ indexPos + 1 , indices, emitOpError);
842
+ })
846
843
.Default ([&](auto otherType) -> LogicalResult {
847
844
return emitOpError ()
848
845
<< " type " << otherType << " cannot be indexed (index #"
@@ -3108,16 +3105,14 @@ OpFoldResult LLVM::ZeroOp::fold(FoldAdaptor) {
3108
3105
// ===----------------------------------------------------------------------===//
3109
3106
3110
3107
// / Compute the total number of elements in the given type, also taking into
3111
- // / account nested types. Supported types are `VectorType`, `LLVMArrayType` and
3112
- // / `LLVMFixedVectorType`. Everything else is treated as a scalar.
3108
+ // / account nested types. Supported types are `VectorType` and `LLVMArrayType`.
3109
+ // / Everything else is treated as a scalar.
3113
3110
static int64_t getNumElements (Type t) {
3114
3111
if (auto vecType = dyn_cast<VectorType>(t))
3115
3112
return vecType.getNumElements () * getNumElements (vecType.getElementType ());
3116
3113
if (auto arrayType = dyn_cast<LLVM::LLVMArrayType>(t))
3117
3114
return arrayType.getNumElements () *
3118
3115
getNumElements (arrayType.getElementType ());
3119
- if (auto vecType = dyn_cast<LLVMFixedVectorType>(t))
3120
- return vecType.getNumElements () * getNumElements (vecType.getElementType ());
3121
3116
assert (!isa<LLVM::LLVMScalableVectorType>(t) &&
3122
3117
" number of elements of a scalable vector type is unknown" );
3123
3118
return 1 ;
@@ -3135,8 +3130,6 @@ static bool hasScalableVectorType(Type t) {
3135
3130
}
3136
3131
if (auto arrayType = dyn_cast<LLVM::LLVMArrayType>(t))
3137
3132
return hasScalableVectorType (arrayType.getElementType ());
3138
- if (auto vecType = dyn_cast<LLVMFixedVectorType>(t))
3139
- return hasScalableVectorType (vecType.getElementType ());
3140
3133
return false ;
3141
3134
}
3142
3135
@@ -3216,8 +3209,7 @@ LogicalResult LLVM::ConstantOp::verify() {
3216
3209
<< " scalable vector type requires a splat attribute" ;
3217
3210
return success ();
3218
3211
}
3219
- if (!isa<VectorType, LLVM::LLVMArrayType, LLVM::LLVMFixedVectorType>(
3220
- getType ()))
3212
+ if (!isa<VectorType, LLVM::LLVMArrayType>(getType ()))
3221
3213
return emitOpError () << " expected vector or array type" ;
3222
3214
// The number of elements of the attribute and the type must match.
3223
3215
int64_t attrNumElements;
@@ -3466,8 +3458,7 @@ LogicalResult LLVM::BitcastOp::verify() {
3466
3458
if (!resultType)
3467
3459
return success ();
3468
3460
3469
- auto isVector =
3470
- llvm::IsaPred<VectorType, LLVMScalableVectorType, LLVMFixedVectorType>;
3461
+ auto isVector = llvm::IsaPred<VectorType, LLVMScalableVectorType>;
3471
3462
3472
3463
// Due to bitcast requiring both operands to be of the same size, it is not
3473
3464
// possible for only one of the two to be a pointer of vectors.
@@ -3883,7 +3874,6 @@ void LLVMDialect::initialize() {
3883
3874
3884
3875
// clang-format off
3885
3876
addTypes<LLVMVoidType,
3886
- LLVMPPCFP128Type,
3887
3877
LLVMTokenType,
3888
3878
LLVMLabelType,
3889
3879
LLVMMetadataType>();
0 commit comments