From 181b0e7037bc2999a24cb45a02523f3da04b254d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 13 Sep 2021 14:27:10 -0700 Subject: RemoveUnusedBrs::tablify() improvements: handle EqZ and tee (#4144) tablify() attempts to turns a sequence of br_ifs into a single br_table. This PR adds some flexibility to the specific pattern it looks for, specifically: * Accept i32.eqz as a comparison to zero, and not just to look for i32.eq against a constant. * Allow the first condition to be a tee. If it is, compare later conditions to local.get of that local. This will allow more br_tables to be emitted in j2cl output. --- scripts/fuzz_opt.py | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 9ccdeb1e4..17d6301dd 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -172,6 +172,7 @@ IMPORTANT_INITIAL_CONTENTS = [ # Recently-added or modified passes. These can be added to and pruned # frequently. os.path.join('lit', 'passes', 'once-reduction.wast'), + os.path.join('passes', 'remove-unused-brs_enable-multivalue.wast'), ] IMPORTANT_INITIAL_CONTENTS = [os.path.join(shared.get_test_dir('.'), t) for t in IMPORTANT_INITIAL_CONTENTS] -- cgit v1.2.3