@@ -1932,12 +1932,12 @@ mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
1932
1932
// element in the vector. Start with an undef vector. Insert the value into
1933
1933
// the first element. Then use a `shufflevector` with a mask of all 0 to
1934
1934
// fill out the entire vector with that value.
1935
- const cir::VectorType vecTy = op.getType ();
1936
- const mlir::Type llvmTy = typeConverter->convertType (vecTy);
1937
- const mlir::Location loc = op.getLoc ();
1938
- const mlir::Value poison = rewriter.create <mlir::LLVM::PoisonOp>(loc, llvmTy);
1935
+ cir::VectorType vecTy = op.getType ();
1936
+ mlir::Type llvmTy = typeConverter->convertType (vecTy);
1937
+ mlir::Location loc = op.getLoc ();
1938
+ mlir::Value poison = rewriter.create <mlir::LLVM::PoisonOp>(loc, llvmTy);
1939
1939
1940
- const mlir::Value elementValue = adaptor.getValue ();
1940
+ mlir::Value elementValue = adaptor.getValue ();
1941
1941
if (mlir::isa<mlir::LLVM::PoisonOp>(elementValue.getDefiningOp ())) {
1942
1942
// If the splat value is poison, then we can just use poison value
1943
1943
// for the entire vector.
@@ -1964,11 +1964,11 @@ mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
1964
1964
}
1965
1965
}
1966
1966
1967
- const mlir::Value indexValue =
1967
+ mlir::Value indexValue =
1968
1968
rewriter.create <mlir::LLVM::ConstantOp>(loc, rewriter.getI64Type (), 0 );
1969
- const mlir::Value oneElement = rewriter.create <mlir::LLVM::InsertElementOp>(
1969
+ mlir::Value oneElement = rewriter.create <mlir::LLVM::InsertElementOp>(
1970
1970
loc, poison, elementValue, indexValue);
1971
- const SmallVector<int32_t > zeroValues (vecTy.getSize (), 0 );
1971
+ SmallVector<int32_t > zeroValues (vecTy.getSize (), 0 );
1972
1972
rewriter.replaceOpWithNewOp <mlir::LLVM::ShuffleVectorOp>(op, oneElement,
1973
1973
poison, zeroValues);
1974
1974
return mlir::success ();
0 commit comments