Skip to content

Commit 11cebbd

Browse files
committed
prop_def instead of opt_prop_def
1 parent 6474cd1 commit 11cebbd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xdsl/dialects/riscv.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
irdl_op_definition,
4444
operand_def,
4545
opt_attr_def,
46-
opt_prop_def,
46+
prop_def,
4747
region_def,
4848
result_def,
4949
var_operand_def,
@@ -3028,7 +3028,7 @@ class RdRsRsFloatFloatIntegerOperationWithFastMath(RISCVInstruction, ABC):
30283028
rd = result_def(IntRegisterType)
30293029
rs1 = operand_def(FloatRegisterType)
30303030
rs2 = operand_def(FloatRegisterType)
3031-
fastmath = opt_prop_def(FastMathFlagsAttr)
3031+
fastmath = prop_def(FastMathFlagsAttr)
30323032

30333033
def __init__(
30343034
self,
@@ -3056,6 +3056,7 @@ def __init__(
30563056
},
30573057
result_types=[rd],
30583058
)
3059+
self.fastmath = fastmath
30593060

30603061
def assembly_line_args(self) -> tuple[AssemblyInstructionArg, ...]:
30613062
return self.rd, self.rs1, self.rs2
@@ -3068,6 +3069,7 @@ def custom_parse_attributes(cls, parser: Parser) -> dict[str, Attribute]:
30683069
fast = FastMathFlagsAttr(FastMathFlagsAttr.parse_parameter(parser))
30693070
if fast != FastMathFlagsAttr("none"):
30703071
attributes["fastmath"] = fast
3072+
cls.fastmath = fast
30713073
return attributes
30723074

30733075
def custom_print_attributes(self, printer: Printer) -> Set[str]:

0 commit comments

Comments
 (0)