@@ -1965,12 +1965,12 @@ mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
19651965 // element in the vector. Start with an undef vector. Insert the value into
19661966 // the first element. Then use a `shufflevector` with a mask of all 0 to
19671967 // fill out the entire vector with that value.
1968- const cir::VectorType vecTy = op.getType ();
1969- const mlir::Type llvmTy = typeConverter->convertType (vecTy);
1970- const mlir::Location loc = op.getLoc ();
1971- const mlir::Value poison = rewriter.create <mlir::LLVM::PoisonOp>(loc, llvmTy);
1968+ cir::VectorType vecTy = op.getType ();
1969+ mlir::Type llvmTy = typeConverter->convertType (vecTy);
1970+ mlir::Location loc = op.getLoc ();
1971+ mlir::Value poison = rewriter.create <mlir::LLVM::PoisonOp>(loc, llvmTy);
19721972
1973- const mlir::Value elementValue = adaptor.getValue ();
1973+ mlir::Value elementValue = adaptor.getValue ();
19741974 if (mlir::isa<mlir::LLVM::PoisonOp>(elementValue.getDefiningOp ())) {
19751975 // If the splat value is poison, then we can just use poison value
19761976 // for the entire vector.
@@ -1997,11 +1997,11 @@ mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
19971997 }
19981998 }
19991999
2000- const mlir::Value indexValue =
2000+ mlir::Value indexValue =
20012001 rewriter.create <mlir::LLVM::ConstantOp>(loc, rewriter.getI64Type (), 0 );
2002- const mlir::Value oneElement = rewriter.create <mlir::LLVM::InsertElementOp>(
2002+ mlir::Value oneElement = rewriter.create <mlir::LLVM::InsertElementOp>(
20032003 loc, poison, elementValue, indexValue);
2004- const SmallVector<int32_t > zeroValues (vecTy.getSize (), 0 );
2004+ SmallVector<int32_t > zeroValues (vecTy.getSize (), 0 );
20052005 rewriter.replaceOpWithNewOp <mlir::LLVM::ShuffleVectorOp>(op, oneElement,
20062006 poison, zeroValues);
20072007 return mlir::success ();
0 commit comments