Skip to content

Commit 4c5ce0d

Browse files
committed
Address code review comment
1 parent b9c65be commit 4c5ce0d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,9 +2006,8 @@ mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
20062006
const mlir::Value oneElement = rewriter.create<mlir::LLVM::InsertElementOp>(
20072007
loc, poison, elementValue, indexValue);
20082008
const SmallVector<int32_t> zeroValues(vecTy.getSize(), 0);
2009-
const mlir::Value shuffled = rewriter.create<mlir::LLVM::ShuffleVectorOp>(
2010-
loc, oneElement, poison, zeroValues);
2011-
rewriter.replaceOp(op, shuffled);
2009+
rewriter.replaceOpWithNewOp<mlir::LLVM::ShuffleVectorOp>(op, oneElement,
2010+
poison, zeroValues);
20122011
return mlir::success();
20132012
}
20142013

0 commit comments

Comments
 (0)