Skip to content

Commit 7004089

Browse files
committed
Use replaceOpWithNewOp
1 parent e0b01d8 commit 7004089

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
@@ -2401,10 +2401,9 @@ mlir::LogicalResult CIRToLLVMComplexAddOpLowering::matchAndRewrite(
24012401
auto realComplex = rewriter.create<mlir::LLVM::InsertValueOp>(
24022402
op->getLoc(), initialComplex, newReal, 0);
24032403

2404-
auto complex = rewriter.create<mlir::LLVM::InsertValueOp>(
2405-
op->getLoc(), realComplex, newImag, 1);
2404+
rewriter.replaceOpWithNewOp<mlir::LLVM::InsertValueOp>(op, realComplex,
2405+
newImag, 1);
24062406

2407-
rewriter.replaceOp(op, complex);
24082407
return mlir::success();
24092408
}
24102409

0 commit comments

Comments
 (0)