diff options
| author | George Adams <georgeadams1995@gmail.com> | 2026-03-10 12:36:29 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-10 20:07:23 -0700 |
| commit | bd5dc3a2fbde68835326d3b1d9fc480bcf6da086 (patch) | |
| tree | 15a668002ca196d031bdf912cf317634b129468e /src/net | |
| parent | 935ba2e486d035c60104217eec8f2a223cdb3bef (diff) | |
| download | go-bd5dc3a2fbde68835326d3b1d9fc480bcf6da086.tar.xz | |
cmd/compile: add double-mask elimination rule for wasm
Add a rule to collapse cascaded I64And operations with constant masks
into a single mask:
(I64And (I64And x (I64Const [c1])) (I64Const [c2])) =>
(I64And x (I64Const [c1 & c2]))
This pattern arises from sub-word comparisons. For example,
(Eq32 x y) lowers to (I64Eq (ZeroExt32to64 x) (ZeroExt32to64 y)),
which becomes (I64Eq (I64And x 0xffffffff) (I64And y 0xffffffff)).
If x or y is the result of another sub-word operation that already
inserted a mask, the masks cascade and this rule collapses them.
Cq-Include-Trybots: luci.golang.try:gotip-wasip1-wasm_wasmtime,gotip-wasip1-wasm_wazero
Change-Id: Id7856b391be3ac20f1bc9eee40995b52c0754aed
Reviewed-on: https://go-review.googlesource.com/c/go/+/753620
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/net')
0 files changed, 0 insertions, 0 deletions
