Remove redundant xor64 with all-ones input for wasm-via-Ion
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Bug 1713092 adds a few MIR folding rules, including ones to remove xor32 with
all-ones inputs. That unfortunately does not generalise to the 64-bit case
because MBitNot is hardwired to Int32, so there's no way to represent the
result.
Fix this, either by allowing MBitNot to also be Int64, or by adding a new
wasm-only path for bit-nots.
Comment 1•3 years ago
|
||
Also see bug 1276009 which is closely related or even a dup.
Assignee | ||
Comment 2•3 years ago
|
||
Bug 1713092 adds a few MIR folding rules, including ones to remove xor32 with
all-ones inputs. That unfortunately does not generalise to the 64-bit case
because MBitNot is hardwired to Int32, so there's no way to represent the
result. This patch enables MBitNot to also take Int64, enables the relevant
folding rules, and adds LIR-level support for that on {x86,arm}{32,64}.
jit-test/tests/wasm/binop-x64-ion-folding.js, jit-test/tests/wasm/integer.js
- New test cases.
jit/MIR.h, jit/RangeAnalysis.cpp
- allow MBitNot to also handle Int64
jit/MIR.cpp
- MWasmBinaryBitwise::foldsTo: enable folding xor64 with an all-ones input
jit/LIROps.yaml, jit/Lowering.cpp
- new LIR node BitNotI64, and lowering to it.
jit/arm/Lowering-arm.h, jit/arm/Lowering-arm.cpp, jit/arm/CodeGenerator-arm.cpp
and equivalents for arm64, x64, x32
- new overload for lowerForALUInt64()
- new function CodeGenerator::visitBitNotI64()
Comment 4•3 years ago
|
||
bugherder |
Description
•