Bug 213176 - Add wasm regresion test for loop
Summary: Add wasm regresion test for loop
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
Keywords: InRadar
Depends on:
Reported: 2020-06-14 00:07 PDT by Yusuke Suzuki
Modified: 2020-06-14 11:56 PDT (History)
3 users (show)

See Also:

Patch (1.82 KB, patch)
2020-06-14 00:28 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-06-14 00:07:10 PDT

  (func $test (param f64) (result f64)
    f64.const 1.0
    f64.const 2.0
    local.get 0

    i32.const 4096
(export "test" (func $test)))

shows bug in iOS11, not in iOS13 according to the above tweet.
It is worth adding this to our stress testing mechanism to ensure this regression does not happen in the future.
Comment 1 Yusuke Suzuki 2020-06-14 00:10:14 PDT
iOS11 => no OSR entry from the loop. There is BBQ & OMG and BBQ uses B3 O1.
iOS13 => there is OSR entry from the loop. There are three tiers, LLInt, BBQ, and OMG. And BBQ uses Air instead of B3 O1.
Comment 2 Takuo Kihira 2020-06-14 00:11:47 PDT
Thanks for filing, Yusuke!

It should return either 1.0 or 2.0 (usually 2.0), but on the Mobile Safari in iOS 11.4.1 it returns 0 always.

When I changed `i32.const 4096` to `i32.const 4095` (or less) it works well suddenly.
Comment 3 Takuo Kihira 2020-06-14 00:16:53 PDT
As far as I checked, any inputs will occur the behavior always.

If you need arguments, 0.5 would a good input to reproduce at least in my env.
Comment 4 Yusuke Suzuki 2020-06-14 00:19:37 PDT
Looked into the test more, and I guess this is https://bugs.webkit.org/show_bug.cgi?id=198106
Comment 5 Yusuke Suzuki 2020-06-14 00:22:06 PDT
(In reply to Yusuke Suzuki from comment #4)
> Looked into the test more, and I guess this is
> https://bugs.webkit.org/show_bug.cgi?id=198106

Yes, I think this is definitely this one. It is nice that we can have one more regression test :)
Comment 6 Yusuke Suzuki 2020-06-14 00:28:15 PDT
Created attachment 401852 [details]
Comment 7 EWS 2020-06-14 11:55:19 PDT
Committed r263011: <https://trac.webkit.org/changeset/263011>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401852 [details].
Comment 8 Radar WebKit Bug Importer 2020-06-14 11:56:25 PDT