Bug 187537 - DFG JIT: compileMathIC produces incorrect machine code
Summary: DFG JIT: compileMathIC produces incorrect machine code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-10 16:02 PDT by Michael Saboff
Modified: 2018-07-10 17:35 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.31 KB, patch)
2018-07-10 16:18 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2018-07-10 16:02:18 PDT
When handling ArithMult in the DFG in some cases with a constant value, we can end up JITMulGenerator::generateInline() without selecting a register.  This causes JITMulGenerator::generateInline() to generate bad code.
Comment 1 Michael Saboff 2018-07-10 16:02:42 PDT
<rdar://problem/41952158>
Comment 2 Michael Saboff 2018-07-10 16:18:15 PDT
Created attachment 344731 [details]
Patch
Comment 3 Saam Barati 2018-07-10 17:01:06 PDT
Comment on attachment 344731 [details]
Patch

r=me
Comment 4 Saam Barati 2018-07-10 17:01:31 PDT
Comment on attachment 344731 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=344731&action=review

> Source/JavaScriptCore/jit/JITMulGenerator.cpp:54
> +        ASSERT(m_left);
> +        ASSERT(m_right);

Maybe RELEASE_ASSERT?
Maybe we can do this for the other generators as well?
Comment 5 WebKit Commit Bot 2018-07-10 17:35:09 PDT
Comment on attachment 344731 [details]
Patch

Clearing flags on attachment: 344731

Committed r233716: <https://trac.webkit.org/changeset/233716>
Comment 6 WebKit Commit Bot 2018-07-10 17:35:10 PDT
All reviewed patches have been landed.  Closing bug.