Closed
Bug 1863609
Opened 1 year ago
Closed 11 months ago
Optimize away a ref.cast that is dominated by a ref.test
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Core
JavaScript: WebAssembly
Tracking
()
RESOLVED
FIXED
126 Branch
Tracking | Status | |
---|---|---|
firefox126 | --- | fixed |
People
(Reporter: rhunt, Assigned: bvisness)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
For a snippet like:
if (x instanceof Foo) {
(Foo)x
}
Compilers might generate a ref.test for the conditional and a ref.cast for the interior. We should be able to optimize away the second type check. We may already do this in MIR, but it'd be good to double check.
Assignee | ||
Updated•1 year ago
|
Assignee: nobody → bvisness
Assignee | ||
Comment 1•11 months ago
|
||
This patch also enables GVN of redundant MTest instructions, where an
MTest is dominated by either the true or false path of a previous MTest
on the same value. This can remove some tests entirely, such as the
trapping path from the cast instruction suggested in the bug.
Pushed by bvisness@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/41ece3527411
Enable GVN of wasm subtype checks. r=rhunt
![]() |
||
Comment 3•11 months ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 11 months ago
status-firefox126:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•