Skip to content

Commit 45b3830

Browse files
committed
fix creates
1 parent 186a5f9 commit 45b3830

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -591,25 +591,25 @@ struct FancyAddFLowering : public ConvertOpToLLVMPattern<arith::AddFOp> {
591591

592592
// Cast operands to 64-bit integers.
593593
Location loc = op.getLoc();
594-
Value lhsBits = rewriter.create<LLVM::ZExtOp>(loc, rewriter.getI64Type(),
595-
adaptor.getLhs());
596-
Value rhsBits = rewriter.create<LLVM::ZExtOp>(loc, rewriter.getI64Type(),
597-
adaptor.getRhs());
594+
Value lhsBits = LLVM::ZExtOp::create(rewriter, loc, rewriter.getI64Type(),
595+
adaptor.getLhs());
596+
Value rhsBits = LLVM::ZExtOp::create(rewriter, loc, rewriter.getI64Type(),
597+
adaptor.getRhs());
598598

599599
// Call software implementation of floating point addition.
600600
int32_t sem =
601601
llvm::APFloatBase::SemanticsToEnum(floatTy.getFloatSemantics());
602-
Value semValue = rewriter.create<LLVM::ConstantOp>(
603-
loc, rewriter.getI32Type(),
602+
Value semValue = LLVM::ConstantOp::create(
603+
rewriter, loc, rewriter.getI32Type(),
604604
rewriter.getIntegerAttr(rewriter.getI32Type(), sem));
605605
SmallVector<Value> params = {semValue, lhsBits, rhsBits};
606606
auto resultOp =
607607
LLVM::CallOp::create(rewriter, loc, TypeRange(rewriter.getI64Type()),
608608
SymbolRefAttr::get(*adder), params);
609609

610610
// Truncate result to the original width.
611-
Value truncatedBits = rewriter.create<LLVM::TruncOp>(
612-
loc, rewriter.getIntegerType(floatTy.getWidth()),
611+
Value truncatedBits = LLVM::TruncOp::create(
612+
rewriter, loc, rewriter.getIntegerType(floatTy.getWidth()),
613613
resultOp->getResult(0));
614614
rewriter.replaceOp(op, truncatedBits);
615615
return success();

0 commit comments

Comments
 (0)