Commit abd2d8db authored by Matthias Braun's avatar Matthias Braun
Browse files

gen_ir: Only set default mode to mode_T if multiple outputs are specified

parent 459c0c85
......@@ -232,6 +232,7 @@ class Builtin:
("M", "memory result"),
# results follow here
]
mode = "mode_T"
flags = [ "uses_memory" ]
attrs = [
Attribute("kind", type="ir_builtin_kind", comment="kind of builtin"),
......@@ -318,6 +319,7 @@ class Switch:
outs = [
("default", "control flow if no other case matches"),
]
mode = "mode_T"
flags = [ "cfopcode", "forking" ]
pinned = "yes"
attrs = [
......
......@@ -111,7 +111,7 @@ def setnodedefaults(node):
node.doc = trim_docstring(node.__doc__)
else:
node.doc = ""
if hasattr(node, "outs"):
if hasattr(node, "outs") and len(node.outs) > 1:
node.mode = "mode_T"
if "start_block" in node.flags:
node.block = "get_irg_start_block(irg)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment