Bug 141546

Summary: ArithSqrt should not be conditional on supportsFloatingPointSqrt
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, msaboff
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch ggaren: review+

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>