[Webkit-unassigned] [Bug 152198] New: B3->Air compare-branch fusion should fuse even if the result of the comparison is used more than once
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 11 16:03:40 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=152198
Bug ID: 152198
Summary: B3->Air compare-branch fusion should fuse even if the
result of the comparison is used more than once
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: fpizlo at apple.com
This code:
cmp
setXX
movzx -> put result in %res
test %res, %res
jnz
...
test %res, %res
jnz
is always worse than this code:
cmp
jXX
...
cmp
jXX
But our instruction selector emits the worse code because it's afraid of emitting the compare instruction more than once. It's also afraid of duplicating loads. The solution is:
- Don't be afraid of duplicating comparisons if you're emitting a branch, since for a shared comparison result, the branch will have to do a second comparison anyway.
- When we decide to match a shared comparison we could simply disable load fusion.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151212/cd6fa959/attachment.html>
More information about the webkit-unassigned
mailing list