WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
279701
[WASM] Fix and fuse br_on_null/non_null in BBQ
https://bugs.webkit.org/show_bug.cgi?id=279701
Summary
[WASM] Fix and fuse br_on_null/non_null in BBQ
David Degazio
Reported
2024-09-13 17:10:54 PDT
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
Comment 1
2024-09-13 17:18:07 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/33650
EWS
Comment 2
2024-09-16 21:39:45 PDT
Committed
283745@main
(17bdcc9f8477): <
https://commits.webkit.org/283745@main
> Reviewed commits have been landed. Closing PR #33650 and removing active labels.
EWS
Comment 3
2024-09-24 11:00:44 PDT
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug