Bug 141546 - ArithSqrt should not be conditional on supportsFloatingPointSqrt
Summary: ArithSqrt should not be conditional on supportsFloatingPointSqrt
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-12 17:54 PST by Benjamin Poulain
Modified: 2015-02-13 15:08 PST (History)
2 users (show)

See Also:


Attachments
Patch (9.41 KB, patch)
2015-02-12 17:55 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (9.59 KB, patch)
2015-02-13 14:55 PST, Benjamin Poulain
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2015-02-12 17:54:06 PST
ArithSqrt should not be conditional on supportsFloatingPointSqrt
Comment 1 Benjamin Poulain 2015-02-12 17:55:26 PST
Created attachment 246495 [details]
Patch
Comment 2 Geoffrey Garen 2015-02-13 10:46:31 PST
Comment on attachment 246495 [details]
Patch

r=me
Comment 3 Filip Pizlo 2015-02-13 11:58:38 PST
Comment on attachment 246495 [details]
Patch

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

You should fix the register allocation bug.  Also, since your tests currently don't disable concurrent JIT, they will be flaky.

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3549
> +    FPRTemporary result(this, op1);

This should be FPRResult instead of FPRTemporary when we're doing flushRegisters().  Otherwise weird and uncommon register allocation bugs will happen.

> Source/JavaScriptCore/tests/stress/math-sqrt-basics-disable-architecture-specific-optimizations.js:1
> +//@ run("no-architecture-specific-optimizations", "--enableArchitectureSpecificOptimizations=false")

Should probably be:

run("no-architecture-specific-optimizations", "--enableArchitectureSpecificOptimizations=false", *NO_CJIT_OPTIONS)

For good measure, you should probably also add a second line that runs in FTL as well.

> Source/JavaScriptCore/tests/stress/math-sqrt-basics-disable-architecture-specific-optimizations.js:10
> +    for (var i = 0; i < 1000000; ++i) {

Only 10000 runs are needed with cjit turned off.

> Source/JavaScriptCore/tests/stress/math-sqrt-basics.js:8
> +    for (var i = 0; i < 1000000; ++i) {

Only 10000 runs are needed.
Comment 4 Benjamin Poulain 2015-02-13 14:55:54 PST
Created attachment 246552 [details]
Patch
Comment 5 Geoffrey Garen 2015-02-13 14:57:27 PST
Comment on attachment 246552 [details]
Patch

r=me
Comment 6 Benjamin Poulain 2015-02-13 15:08:23 PST
Committed r180085: <http://trac.webkit.org/changeset/180085>