Skip to content

Commit 0d6fc68

Browse files
committed
nit fixes
1 parent 581e190 commit 0d6fc68

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ class LLVM_CastOpWithNNegFlag<string mnemonic, string instName, Type type,
512512
Type resultType, list<Trait> traits = []> :
513513
LLVM_Op<mnemonic, !listconcat([Pure], [DeclareOpInterfaceMethods<NonNegFlagInterface>], traits)>,
514514
LLVM_Builder<"$res = builder.Create" # instName # "($arg, $_resultType, /*Name=*/\"\", op.getNonNeg());"> {
515-
let arguments = (ins type:$arg, UnitAttr:$nonNeg);
515+
let arguments = (ins type:$arg, UnitAttr:$nonNeg);
516516
let results = (outs resultType:$res);
517517
let builders = [LLVM_OneResultOpBuilder];
518518
let assemblyFormat = "(`nneg` $nonNeg^)? $arg attr-dict `:` type($arg) `to` type($res)";

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ static void printLLVMOpAttrs(OpAsmPrinter &printer, Operation *op,
146146
} else if (auto iface = dyn_cast<ExactFlagInterface>(op)) {
147147
printer.printOptionalAttrDict(filteredAttrs,
148148
/*elidedAttrs=*/{iface.getIsExactName()});
149-
} else if (auto iface = dyn_cast<NonNegFlagInterface>(op)) {
150-
printer.printOptionalAttrDict(filteredAttrs,
151-
/*elidedAttrs=*/{iface.getNonNegName()});
152149
} else {
153150
printer.printOptionalAttrDict(filteredAttrs);
154151
}

mlir/test/Dialect/LLVMIR/roundtrip.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ func.func @nneg_casts(%arg0: i32, %arg1: i64, %arg2: vector<4xi32>,
333333
%0 = llvm.zext nneg %arg0 : i32 to i64
334334
// CHECK: = llvm.zext nneg %[[V4I32]] : vector<4xi32> to vector<4xi64>
335335
%4 = llvm.zext nneg %arg2 : vector<4xi32> to vector<4xi64>
336-
// CHECK: %[[FLOAT:.*]] = llvm.uitofp nneg %[[I32]] : i32 to f32
336+
// CHECK: = llvm.uitofp nneg %[[I32]] : i32 to f32
337337
%7 = llvm.uitofp nneg %arg0 : i32 to f32
338338
llvm.return
339339
}

0 commit comments

Comments
 (0)