Bug 197792

Summary: [B3::ReduceStrength] specializeSelect should update m_root and clear the m_valueForConstant cache
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: JavaScriptCoreAssignee: Robin Morisset <rmorisset>
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 197265    
Bug Blocks:    

Description Robin Morisset 2019-05-10 12:59:25 PDT
When I added https://bugs.webkit.org/show_bug.cgi?id=197265 I assumed that which block is the root does not change in the middle of strength reduction.
But specializeSelect can use splitForward, which for some odd reason uses a new block for the first half of the given block (instead of using a new block for the second half, as I expected).
So if the block being split is the root block I must update m_root and erase the m_valueInConstant cache.
Erasing the cache cannot cause wrong results: at most it can make us miss some optimization opportunities in this iteration of the fixpoint.
Comment 1 Robin Morisset 2019-05-10 12:59:39 PDT
Comment 2 Robin Morisset 2019-05-10 13:00:45 PDT

*** This bug has been marked as a duplicate of bug 197756 ***