Bug 227188

Summary: Add a new pattern to instruction selector to utilize SMADDL supported by ARM64
Product: WebKit Reporter: Yijia Huang <yijia_huang>
Component: JavaScriptCoreAssignee: Yijia Huang <yijia_huang>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch ews-feeder: commit-queue-

Description Yijia Huang 2021-06-19 18:03:18 PDT
...
Comment 1 Yijia Huang 2021-06-21 11:55:17 PDT
Created attachment 431889 [details]
Patch
Comment 2 Yijia Huang 2021-06-21 12:06:50 PDT
Created attachment 431891 [details]
Patch
Comment 3 Saam Barati 2021-06-21 18:17:09 PDT
Comment on attachment 431891 [details]
Patch

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

Nice. r=me

> Source/JavaScriptCore/b3/B3LowerToAir.cpp:2548
>              Air::Opcode multiplyAddOpcode = tryOpcodeForType(MultiplyAdd32, MultiplyAdd64, m_value->type());

maybe worth an assert the multiple add sign extend is available on the same platforms as this, otherwise we wouldn't want it inside this if statement.

Maybe: ASSERT(isValidForm(MultiplyAdd64, Arg::Tmp, Arg::Tmp, Arg::Tmp, Arg::Tmp) == isValidForm(MultiplyAddSignExtend32, Arg::Tmp, Arg::Tmp, Arg::Tmp, Arg::Tmp))
Comment 4 Yijia Huang 2021-06-21 18:47:00 PDT
Created attachment 431938 [details]
Patch
Comment 5 Yijia Huang 2021-06-22 10:17:05 PDT
Created attachment 431972 [details]
Patch
Comment 6 Yijia Huang 2021-06-22 10:18:29 PDT
(In reply to Saam Barati from comment #3)
> Comment on attachment 431891 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431891&action=review
> 
> Nice. r=me
> 
> > Source/JavaScriptCore/b3/B3LowerToAir.cpp:2548
> >              Air::Opcode multiplyAddOpcode = tryOpcodeForType(MultiplyAdd32, MultiplyAdd64, m_value->type());
> 
> maybe worth an assert the multiple add sign extend is available on the same
> platforms as this, otherwise we wouldn't want it inside this if statement.
> 
> Maybe: ASSERT(isValidForm(MultiplyAdd64, Arg::Tmp, Arg::Tmp, Arg::Tmp,
> Arg::Tmp) == isValidForm(MultiplyAddSignExtend32, Arg::Tmp, Arg::Tmp,
> Arg::Tmp, Arg::Tmp))

Updated, thanks for the review.
Comment 7 Yijia Huang 2021-06-22 10:48:31 PDT
Created attachment 431974 [details]
Patch
Comment 8 EWS 2021-06-22 11:53:48 PDT
Committed r279134 (239048@main): <https://commits.webkit.org/239048@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431974 [details].