@@ -61,13 +61,13 @@ static Value truncToI32(ImplicitLocOpBuilder &b, Value value) {
61
61
static Type inferIntrinsicResultType (Type vectorResultType) {
62
62
MLIRContext *ctx = vectorResultType.getContext ();
63
63
auto a = cast<LLVM::LLVMArrayType>(vectorResultType);
64
- auto f16x2Ty = LLVM::getFixedVectorType ( Float16Type::get (ctx), 2 );
64
+ auto f16x2Ty = VectorType::get ( 2 , Float16Type::get (ctx));
65
65
auto i32Ty = IntegerType::get (ctx, 32 );
66
- auto i32x2Ty = LLVM::getFixedVectorType (i32Ty, 2 );
66
+ auto i32x2Ty = VectorType::get ( 2 , i32Ty );
67
67
Type f64Ty = Float64Type::get (ctx);
68
- Type f64x2Ty = LLVM::getFixedVectorType (f64Ty, 2 );
68
+ Type f64x2Ty = VectorType::get ( 2 , f64Ty );
69
69
Type f32Ty = Float32Type::get (ctx);
70
- Type f32x2Ty = LLVM::getFixedVectorType (f32Ty, 2 );
70
+ Type f32x2Ty = VectorType::get ( 2 , f32Ty );
71
71
if (a.getElementType () == f16x2Ty) {
72
72
return LLVM::LLVMStructType::getLiteral (
73
73
ctx, SmallVector<Type>(a.getNumElements (), f16x2Ty));
@@ -85,7 +85,7 @@ static Type inferIntrinsicResultType(Type vectorResultType) {
85
85
ctx,
86
86
SmallVector<Type>(static_cast <size_t >(a.getNumElements ()) * 2 , f32Ty));
87
87
}
88
- if (a.getElementType () == LLVM::getFixedVectorType (f32Ty, 1 )) {
88
+ if (a.getElementType () == VectorType::get ( 1 , f32Ty )) {
89
89
return LLVM::LLVMStructType::getLiteral (
90
90
ctx, SmallVector<Type>(static_cast <size_t >(a.getNumElements ()), f32Ty));
91
91
}
@@ -106,11 +106,11 @@ static Value convertIntrinsicResult(Location loc, Type intrinsicResultType,
106
106
Type i32Ty = rewriter.getI32Type ();
107
107
Type f32Ty = rewriter.getF32Type ();
108
108
Type f64Ty = rewriter.getF64Type ();
109
- Type f16x2Ty = LLVM::getFixedVectorType ( rewriter.getF16Type (), 2 );
110
- Type i32x2Ty = LLVM::getFixedVectorType (i32Ty, 2 );
111
- Type f64x2Ty = LLVM::getFixedVectorType (f64Ty, 2 );
112
- Type f32x2Ty = LLVM::getFixedVectorType (f32Ty, 2 );
113
- Type f32x1Ty = LLVM::getFixedVectorType (f32Ty, 1 );
109
+ Type f16x2Ty = VectorType::get ( 2 , rewriter.getF16Type ());
110
+ Type i32x2Ty = VectorType::get ( 2 , i32Ty );
111
+ Type f64x2Ty = VectorType::get ( 2 , f64Ty );
112
+ Type f32x2Ty = VectorType::get ( 2 , f32Ty );
113
+ Type f32x1Ty = VectorType::get ( 1 , f32Ty );
114
114
115
115
auto makeConst = [&](int32_t index) -> Value {
116
116
return rewriter.create <LLVM::ConstantOp>(loc, IntegerType::get (ctx, 32 ),
@@ -181,9 +181,9 @@ static SmallVector<Value> unpackOperandVector(ImplicitLocOpBuilder &b,
181
181
Type f64Ty = b.getF64Type ();
182
182
Type f32Ty = b.getF32Type ();
183
183
Type i64Ty = b.getI64Type ();
184
- Type i8x4Ty = LLVM::getFixedVectorType ( b.getI8Type (), 4 );
185
- Type i4x8Ty = LLVM::getFixedVectorType ( b.getIntegerType (4 ), 8 );
186
- Type f32x1Ty = LLVM::getFixedVectorType (f32Ty, 1 );
184
+ Type i8x4Ty = VectorType::get ( 4 , b.getI8Type ());
185
+ Type i4x8Ty = VectorType::get ( 8 , b.getIntegerType (4 ));
186
+ Type f32x1Ty = VectorType::get ( 1 , f32Ty );
187
187
auto arrayTy = cast<LLVM::LLVMArrayType>(operand.getType ());
188
188
189
189
for (unsigned i = 0 , e = arrayTy.getNumElements (); i < e; ++i) {
@@ -268,8 +268,8 @@ struct MmaLdMatrixOpToNVVM : public ConvertOpToLLVMPattern<nvgpu::LdMatrixOp> {
268
268
if (!vectorResultType) {
269
269
return failure ();
270
270
}
271
- Type innerVectorType = LLVM::getFixedVectorType (
272
- vectorResultType.getElementType (), vectorResultType. getDimSize ( 1 ));
271
+ Type innerVectorType = VectorType::get (vectorResultType. getDimSize ( 1 ),
272
+ vectorResultType.getElementType ());
273
273
274
274
int64_t num32BitRegs = vectorResultType.getDimSize (0 );
275
275
@@ -627,8 +627,7 @@ struct NVGPUMmaSparseSyncLowering
627
627
628
628
// Bitcast the sparse metadata from vector<2xf16> to an i32.
629
629
Value sparseMetadata = adaptor.getSparseMetadata ();
630
- if (sparseMetadata.getType () !=
631
- LLVM::getFixedVectorType (rewriter.getI16Type (), 2 ))
630
+ if (sparseMetadata.getType () != VectorType::get (2 , rewriter.getI16Type ()))
632
631
return op->emitOpError () << " Expected metadata type to be LLVM "
633
632
" VectorType of 2 i16 elements" ;
634
633
sparseMetadata =
0 commit comments