Bug 150759 - B3::LowerToAir should recognize Neg (i.e. Sub($0, value))
Summary: B3::LowerToAir should recognize Neg (i.e. Sub($0, value))
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 150279
  Show dependency treegraph
 
Reported: 2015-10-31 11:14 PDT by Filip Pizlo
Modified: 2015-11-03 16:42 PST (History)
10 users (show)

See Also:


Attachments
the patch (8.44 KB, patch)
2015-11-03 16:18 PST, Filip Pizlo
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-10-31 11:14:44 PDT
I don't think that the current trySub() lowering handles this.

We could handle it either using a second pattern match rule, or by recognizing the zero immediate inside trySub().
Comment 1 Filip Pizlo 2015-11-03 16:18:50 PST
Created attachment 264750 [details]
the patch
Comment 2 Benjamin Poulain 2015-11-03 16:32:07 PST
Comment on attachment 264750 [details]
the patch

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

> Source/JavaScriptCore/b3/B3LoweringMatcher.patterns:40
> +StoreSubLoad = Store(Sub(left, right), address)

Aw, crap.
Comment 3 Filip Pizlo 2015-11-03 16:42:19 PST
Landed in http://trac.webkit.org/changeset/191996