# mir_passes @preserve "test:main" {} @preserve "test:bool_cond" { if bool sco @s[] "foo": say "hello"; if not bool sco @s[] "foo": say "goodbye"; } @preserve "test:not_and" { if not and pred "foo:bar", pred "bar:foo": say "Hello"; } @preserve "test:or" { # Simple case if or pred "foo:bar", pred "bar:foo": say "Hello"; # Nested if or or pred "foo:bar", and pred "foo:bar2", pred "foo:bar3", pred "foo:bar4": say "Hello2"; # Should be put in an if function if or exi stg "foo:bar" "foo", exi stg "foo:bar" "foo" { say "Hello3"; say "Hello4"; }; # Should be lowered to simple adds, but not the eq if or bool sco @s[] "foo", or bool sco @s[] "bar", eq sco @s[] "foo", 1s: say "Hello5"; } @preserve "test:xor" { if xor pred "foo:bar", pred "bar:foo": say "Hello"; }