Skip to content

Commit 0546cab

Browse files
committed
Address review comments
1 parent 75d9618 commit 0546cab

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ class AttrConvertOverflowToLLVM {
9797
Builder b(ctx);
9898
auto llvmFlagAttr = IntegerOverflowFlagsAttr::get(ctx, llvmFlag);
9999
StringRef llvmAttrName = TargetOp::getOverflowFlagsAttrName();
100-
SmallVector<NamedAttribute> attrs;
101-
attrs.push_back(b.getNamedAttr(llvmAttrName, llvmFlagAttr));
100+
NamedAttribute attr{llvmAttrName, llvmFlagAttr};
102101
// Set the properties attribute of the operation state so that the
103102
// property can be updated when the operation is created.
104-
propertiesAttr = b.getDictionaryAttr(attrs);
103+
propertiesAttr = b.getDictionaryAttr(ArrayRef(attr));
105104
}
106105
}
107106
ArrayRef<NamedAttribute> getAttrs() const { return convertedAttr.getAttrs(); }

mlir/include/mlir/Dialect/Arith/IR/ArithOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def Arith_ShRUIOp : Arith_IntBinaryOpWithExactFlag<"shrui", [Pure]> {
856856
filled with zeros. If the value of the second operand is greater or equal than the
857857
bitwidth of the first operand, then the operation returns poison.
858858

859-
If the `exact` keyword is present, the result value of shrui is a poison
859+
If the `exact` attribute is present, the result value of shrui is a poison
860860
value if any of the bits shifted out are non-zero.
861861

862862
Example:
@@ -887,7 +887,7 @@ def Arith_ShRSIOp : Arith_IntBinaryOpWithExactFlag<"shrsi", [Pure]> {
887887
operand is greater or equal than bitwidth of the first operand, then the operation
888888
returns poison.
889889

890-
If the `exact` keyword is present, the result value of shrsi is a poison
890+
If the `exact` attribute is present, the result value of shrsi is a poison
891891
value if any of the bits shifted out are non-zero.
892892

893893
Example:

0 commit comments

Comments
 (0)