oppc/code: supply transient to unary exprs
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:09:45 +0000 (22:09 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:08 +0000 (22:10 +0300)
src/openpower/oppc/pc_code.py

index ff8d60063e306207e5288832d2172b29ffcb0744..49b045e6a602105aee2352327f2382fd6f1bb4dd 100644 (file)
@@ -283,7 +283,9 @@ class CodeVisitor(pc_util.Visitor):
         yield node
         if isinstance(node.value, pc_ast.IfExpr):
             self.fixup_ternary(node=node.value)
+        transient = self.transient()
         call = self.call(name=str(self[node.op]), code=[
+            self[transient],
             self[node.value],
         ])
         with self.pseudocode(node=node):