Skip to content

Commit

Permalink
Fix some test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
SF-N committed Feb 11, 2025
1 parent 101a25b commit ed0248e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gt4py/next/iterator/transforms/constant_folding.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def value_from_literal(literal: ir.Literal):


class UndoCanonicalizeMinus(eve.NodeTranslator):
PRESERVED_ANNEX_ATTRS = (
"type",
"domain",
)

def visit_FunCall(self, node: ir.FunCall, **kwargs) -> ir.Node:
node = super().generic_visit(node, **kwargs)
# `a + (-b)` -> `a - b` , `-a + b` -> `b - a`, `-a + (-b)` -> `-a - b`
Expand Down

0 comments on commit ed0248e

Please sign in to comment.