Bug 157548 - Air may decide to put the result register of an arithmetic snippet in the tag register
Summary: Air may decide to put the result register of an arithmetic snippet in the tag...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
: 157524 157547 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-10 17:44 PDT by Saam Barati
Modified: 2016-05-11 14:52 PDT (History)
9 users (show)

See Also:


Attachments
WIP (14.65 KB, patch)
2016-05-10 17:44 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
WIP (14.00 KB, patch)
2016-05-10 19:08 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (17.23 KB, patch)
2016-05-11 11:50 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2016-05-10 17:44:35 PDT
This causes our code for boxDouble to hilariously fail.
Comment 1 Saam Barati 2016-05-10 17:44:57 PDT
Created attachment 278557 [details]
WIP
Comment 2 Benjamin Poulain 2016-05-10 18:02:19 PDT
Comment on attachment 278557 [details]
WIP

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

> Source/JavaScriptCore/b3/B3LowerToAir.cpp:1008
> +            case ValueRep::LateUseRegister: // FIXME: correct?

Yep, that's fine.

> Source/JavaScriptCore/b3/B3LowerToAir.cpp:2194
> +                case ValueRep::LateUseRegister:

This should probably just be invalid.

> Source/JavaScriptCore/b3/B3Validate.cpp:337
> +                    //case ValueRep::LateUseRegister: // FIXME: is this validating result kind?

Yeah, you can probably make this rep invalid.
Comment 3 Filip Pizlo 2016-05-10 18:38:50 PDT
Comment on attachment 278557 [details]
WIP

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

>> Source/JavaScriptCore/b3/B3LowerToAir.cpp:1008
>> +            case ValueRep::LateUseRegister: // FIXME: correct?
> 
> Yep, that's fine.

The other late thing is LateColdAny, which does not contain the word "Use".  So, I would call this ValueRep::LateRegister.

>> Source/JavaScriptCore/b3/B3Validate.cpp:337
>> +                    //case ValueRep::LateUseRegister: // FIXME: is this validating result kind?
> 
> Yeah, you can probably make this rep invalid.

+1

> Source/JavaScriptCore/b3/B3ValueRep.h:122
> +        return ValueRep(LateUse, reg);

Note, you could have written this as:

ValueRep result(reg);
result.m_kind = LateRegister;
return result;

And that would allow you to get rid of the LateUseTag overload of the constructor.  It's OK if you want to do it this way, though.
Comment 4 Saam Barati 2016-05-10 19:08:19 PDT
Created attachment 278569 [details]
WIP
Comment 5 Saam Barati 2016-05-11 00:13:53 PDT
*** Bug 157547 has been marked as a duplicate of this bug. ***
Comment 6 Saam Barati 2016-05-11 11:50:14 PDT
Created attachment 278643 [details]
patch
Comment 7 WebKit Commit Bot 2016-05-11 11:53:12 PDT
Attachment 278643 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/b3/testb3.cpp:11824:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/b3/testb3.cpp:11842:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Saam Barati 2016-05-11 12:14:02 PDT
*** Bug 157524 has been marked as a duplicate of this bug. ***
Comment 9 WebKit Commit Bot 2016-05-11 13:53:20 PDT
Comment on attachment 278643 [details]
patch

Clearing flags on attachment: 278643

Committed r200701: <http://trac.webkit.org/changeset/200701>
Comment 10 WebKit Commit Bot 2016-05-11 13:53:24 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Geoffrey Garen 2016-05-11 14:30:02 PDT
No regression test for the snippets?
Comment 12 Saam Barati 2016-05-11 14:52:15 PDT
(In reply to comment #11)
> No regression test for the snippets?

There is a test that has been failing for the last day that's already landed.