@@ -61,13 +61,13 @@ static Value truncToI32(ImplicitLocOpBuilder &b, Value value) {
6161static Type inferIntrinsicResultType (Type vectorResultType) {
6262 MLIRContext *ctx = vectorResultType.getContext ();
6363 auto a = cast<LLVM::LLVMArrayType>(vectorResultType);
64- auto f16x2Ty = LLVM::getFixedVectorType ( Float16Type::get (ctx), 2 );
64+ auto f16x2Ty = VectorType::get ( 2 , Float16Type::get (ctx));
6565 auto i32Ty = IntegerType::get (ctx, 32 );
66- auto i32x2Ty = LLVM::getFixedVectorType (i32Ty, 2 );
66+ auto i32x2Ty = VectorType::get ( 2 , i32Ty );
6767 Type f64Ty = Float64Type::get (ctx);
68- Type f64x2Ty = LLVM::getFixedVectorType (f64Ty, 2 );
68+ Type f64x2Ty = VectorType::get ( 2 , f64Ty );
6969 Type f32Ty = Float32Type::get (ctx);
70- Type f32x2Ty = LLVM::getFixedVectorType (f32Ty, 2 );
70+ Type f32x2Ty = VectorType::get ( 2 , f32Ty );
7171 if (a.getElementType () == f16x2Ty) {
7272 return LLVM::LLVMStructType::getLiteral (
7373 ctx, SmallVector<Type>(a.getNumElements (), f16x2Ty));
@@ -85,7 +85,7 @@ static Type inferIntrinsicResultType(Type vectorResultType) {
8585 ctx,
8686 SmallVector<Type>(static_cast <size_t >(a.getNumElements ()) * 2 , f32Ty));
8787 }
88- if (a.getElementType () == LLVM::getFixedVectorType (f32Ty, 1 )) {
88+ if (a.getElementType () == VectorType::get ( 1 , f32Ty )) {
8989 return LLVM::LLVMStructType::getLiteral (
9090 ctx, SmallVector<Type>(static_cast <size_t >(a.getNumElements ()), f32Ty));
9191 }
@@ -106,11 +106,11 @@ static Value convertIntrinsicResult(Location loc, Type intrinsicResultType,
106106 Type i32Ty = rewriter.getI32Type ();
107107 Type f32Ty = rewriter.getF32Type ();
108108 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 );
114114
115115 auto makeConst = [&](int32_t index) -> Value {
116116 return rewriter.create <LLVM::ConstantOp>(loc, IntegerType::get (ctx, 32 ),
@@ -181,9 +181,9 @@ static SmallVector<Value> unpackOperandVector(ImplicitLocOpBuilder &b,
181181 Type f64Ty = b.getF64Type ();
182182 Type f32Ty = b.getF32Type ();
183183 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 );
187187 auto arrayTy = cast<LLVM::LLVMArrayType>(operand.getType ());
188188
189189 for (unsigned i = 0 , e = arrayTy.getNumElements (); i < e; ++i) {
@@ -268,8 +268,8 @@ struct MmaLdMatrixOpToNVVM : public ConvertOpToLLVMPattern<nvgpu::LdMatrixOp> {
268268 if (!vectorResultType) {
269269 return failure ();
270270 }
271- Type innerVectorType = LLVM::getFixedVectorType (
272- vectorResultType.getElementType (), vectorResultType. getDimSize ( 1 ));
271+ Type innerVectorType = VectorType::get (vectorResultType. getDimSize ( 1 ),
272+ vectorResultType.getElementType ());
273273
274274 int64_t num32BitRegs = vectorResultType.getDimSize (0 );
275275
@@ -627,8 +627,7 @@ struct NVGPUMmaSparseSyncLowering
627627
628628 // Bitcast the sparse metadata from vector<2xf16> to an i32.
629629 Value sparseMetadata = adaptor.getSparseMetadata ();
630- if (sparseMetadata.getType () !=
631- LLVM::getFixedVectorType (rewriter.getI16Type (), 2 ))
630+ if (sparseMetadata.getType () != VectorType::get (2 , rewriter.getI16Type ()))
632631 return op->emitOpError () << " Expected metadata type to be LLVM "
633632 " VectorType of 2 i16 elements" ;
634633 sparseMetadata =
0 commit comments