-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
) * add i32.branch_{and,or,xor}[_imm] instructions There is no need for i64 counterparts since in Wasm only i32 types are used as conditional "bool" types. * add i32.branch_{nand, nor, xnor}[_imm] instructions We added these instruction to provide optimizations for encode_eqz. * rename new branch instructions * add fusion of i32.{and,or,xor} + i32.eqz * add forgotten i32.{and,or,xor}+i32.eqz+branch translations * add fuse benchmark to showcase perf gains * bump count_until limit to make it less noisy * fix bug in executor for new fuse instructions * add i32.{and,or,xor} + i32.eqz fusion tests * add i32.{and,or,xor} + i32.eqz + br_if fuse tests
- Loading branch information
Showing
15 changed files
with
757 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(module | ||
(func (export "test") (param $n i32) (result i32) | ||
(local $i i32) | ||
(loop $continue | ||
;; i += 1 | ||
(local.set $i | ||
(i32.add | ||
(local.get $i) | ||
(i32.const 1) | ||
) | ||
) | ||
;; if not((i >= n) and (i <= n)) then continue | ||
;; Note: The above is equal to: | ||
;; if i != n then continue | ||
(br_if | ||
$continue | ||
(i32.eqz | ||
(i32.and | ||
(i32.ge_u (local.get $i) (local.get $n)) | ||
(i32.le_u (local.get $i) (local.get $n)) | ||
) | ||
) | ||
) | ||
) | ||
(return (local.get $i)) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.