Bug 150759

Summary: B3::LowerToAir should recognize Neg (i.e. Sub($0, value))
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Severity: Normal CC: barraclough, benjamin, ggaren, mark.lam, mhahnenb, msaboff, nrotem, oliver, sam, sbarati
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 150279    
Description Flags
the patch benjamin: review+

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