BUG: Codegen optimization for + failed to fire
This commit is contained in:
parent
656b44e18f
commit
a673db77ca
2
ir.py
2
ir.py
|
@ -222,7 +222,7 @@ class Application:
|
|||
return unwrap_opt(self.first.try_apply(self.arg)).codegen()
|
||||
else:
|
||||
match self.first:
|
||||
case Application(Builtin(Builtin.BB_PLUS), addend1):
|
||||
case Application(Builtin(Builtin.BB_PLUS()), addend1):
|
||||
return f'({addend1.codegen()} + {self.arg.codegen()})'
|
||||
case Builtin(Builtin.BB_PLUS_CONST(n)):
|
||||
return f'({self.arg.codegen()}{n:+})'
|
||||
|
|
Loading…
Reference in a new issue