Bug 232051 - [JSC] ArithAbs should care about INT32_MIN
Summary: [JSC] ArithAbs should care about INT32_MIN
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-20 15:12 PDT by Yusuke Suzuki
Modified: 2021-10-20 17:00 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.42 KB, patch)
2021-10-20 15:14 PDT, Yusuke Suzuki
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-10-20 15:12:51 PDT
[JSC] ArithAbs should care about INT32_MIN
Comment 1 Yusuke Suzuki 2021-10-20 15:14:03 PDT
Created attachment 441946 [details]
Patch
Comment 2 Yusuke Suzuki 2021-10-20 15:14:07 PDT
<rdar://problem/84338648>
Comment 3 Michael Saboff 2021-10-20 15:20:40 PDT
Comment on attachment 441946 [details]
Patch

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

r=me

> Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1395
> +            // If ArithAbs cares overflow, then INT32_MIN input will cause OSR exit.

"cares about" sounds better.

> Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1402
> +            // If ArithAbs does not care overflow, it can return INT32_MIN if the input is INT32_MIN.

"... care about overflow" sounds better.
Comment 4 Yusuke Suzuki 2021-10-20 15:58:35 PDT
Comment on attachment 441946 [details]
Patch

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

>> Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1395
>> +            // If ArithAbs cares overflow, then INT32_MIN input will cause OSR exit.
> 
> "cares about" sounds better.

Sounds good!

>> Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1402
>> +            // If ArithAbs does not care overflow, it can return INT32_MIN if the input is INT32_MIN.
> 
> "... care about overflow" sounds better.

Nice, fixed.
Comment 5 Yusuke Suzuki 2021-10-20 17:00:39 PDT
Committed r284585 (243320@main): <https://commits.webkit.org/243320@main>