egraphs-good / eggcc

MIT License
51 stars 11 forks source link

fix switch bug #302

Closed ajpal closed 9 months ago

ajpal commented 9 months ago

if x then y else z is the same as switch x (cons z (cons y nil)) (note the switched branches) We've made this mistake a few times and I think fixed it on various branches, but we should just merge the change to main.

Alex-Fischman commented 9 months ago

Actually the 3/4 optimizations are also wrong