Bug 279701
| Summary: | [WASM] Fix and fuse br_on_null/non_null in BBQ | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Degazio <d_degazio> |
| Component: | WebAssembly | Assignee: | David Degazio <d_degazio> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Degazio
rdar://135586113
The implementation of br_on_null and br_on_non_null in BBQ currently works by materializing the condition into a value, potentially pinning that value to the scratch register, then calling the base BBQJIT::addBranch() as a helper. This isn't really how addBranch() is supposed to be used, and in particular, the fact that a pinned value can flow into parameter passing logic trips debug assertions in BBQJIT (and I think potentially could lead to niche register allocation bugs, since the scratch register isn't necessarily preserved through branch parameter shuffling). I think we should just make these instructions manage emitting the branch themselves, so we don't have to communicate intermediate values to the BBQ register allocator, and also skip an intermediate setcc/cset instruction.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Degazio
Pull request: https://github.com/WebKit/WebKit/pull/33650
EWS
Committed 283745@main (17bdcc9f8477): <https://commits.webkit.org/283745@main>
Reviewed commits have been landed. Closing PR #33650 and removing active labels.
EWS
Committed 283286.116@safari-7620-branch (b1988e84c4af): <https://commits.webkit.org/283286.116@safari-7620-branch>
Reviewed commits have been landed. Closing PR #1884 and removing active labels.