-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM.SIMD int64x2 operations #3490
Conversation
@Cellule @MikeHolman please ignore this PR for now. |
79e4d21
to
d6a3471
Compare
@Cellule could you please take a look at this PR when you have a chance? |
@Cellule please ignore this PR. Looks like I have a few more things to look at. |
4386f74
to
25d29a0
Compare
@Cellule @MikeHolman Hey guys! Could you please take a look? It finally looks somewhat decent. I'm thinking revisiting |
Reviewed 45 of 47 files at r1, 2 of 2 files at r2. lib/Backend/IRBuilderAsmJs.cpp, line 4526 at r2 (raw file):
nit: extra newline lib/Backend/LowerMDSharedSimd128.cpp, line 1164 at r2 (raw file):
nit: Prefer lib/Runtime/ByteCode/AsmJsByteCodeDumper.cpp, line 380 at r2 (raw file):
nit: Int64x2 lib/Runtime/ByteCode/OpLayoutsAsmJs.h, line 301 at r2 (raw file):
nit: I believe this is a remnant of testing. Can you clean up please ? lib/Runtime/Language/Chakra.Runtime.Language.vcxproj, line 98 at r2 (raw file):
Please add the header file below lib/Runtime/Language/SimdInt64x2Operation.cpp, line 43 at r2 (raw file):
Why did you changed to passing the dst and src by pointer instead of returning the dst and receive the src by reference ? lib/Runtime/Language/SimdUtils.h, line 234 at r2 (raw file):
I didn't realize before, but it would be nice to have lib/Runtime/Language/ValueType.h, line 193 at r2 (raw file):
Do we really need Likely types in Wasm ? test/wasm.simd/int64x2.wast, line 16 at r2 (raw file):
nit: trailing whitespaces test/wasm.simd/int64x2.wast, line 18 at r2 (raw file):
nit: You could write this without locals using the stack
test/wasm.simd/int64x2Tests.js, line 31 at r2 (raw file):
Any reason to move the result into the array ? It doesn't look like it is used by the test and is simply reread for asserting. Comments from Reviewable |
Review status: all files reviewed at latest revision, 11 unresolved discussions. lib/Runtime/Language/Chakra.Runtime.Language.vcxproj, line 98 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
You mean to exclude it from ARM builds? lib/Runtime/Language/SimdInt64x2Operation.cpp, line 43 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
The calling convention behaviour was inconsistent: arguments would end up either in a register or on a stack. I figured an added complexity required to handle both cases wasn't worth it considering this path is a fallback. lib/Runtime/Language/SimdUtils.h, line 234 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
I was thinking the same thing, but I didn't note it down, so I forgot to eventually add it. lib/Runtime/Language/ValueType.h, line 193 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
I'd keep it for the sake of completeness for now 😄 I'm a bit fuzzy if we are going to get JavaScript API for handling SIMD types. test/wasm.simd/int64x2.wast, line 18 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
I'd like to keep the current version unless you feel strongly against it. (func (export "func_i64x2_replacelane_0") (local $v1 m128) (local $val i64)
(i32.const 0)
(m128.load offset=0 align=4 (i32.const 0))
(i64.load offset=16 align=4 (i32.const 0))
(i64x2.replace_lane lane=1)
(m128.store offset=0)
) test/wasm.simd/int64x2Tests.js, line 31 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
No reason. In fact, I started doing just that in my recent tests. I'll change the tests. Comments from Reviewable |
Reviewed 7 of 7 files at r3. lib/Runtime/Language/Chakra.Runtime.Language.vcxproj, line 98 at r2 (raw file): Previously, Krovatkin (Nick Korovaiko) wrote…
I mean to add lib/Runtime/Language/SimdInt64x2Operation.cpp, line 43 at r2 (raw file):
I see, so I guess if/when we'll implement these call directly in the jit and not call helper we could/should use the previous calling convention. Is that right ? test/wasm.simd/int64x2.wast, line 18 at r2 (raw file): Previously, Krovatkin (Nick Korovaiko) wrote…
I see your point. I don't feel particularly strongly about it so we can keep like that. Comments from Reviewable |
I don't remember are able to run the tests in the private repository ?
Also, I would recommend doing an integration of master into wasm.simd after this PR
Reviewed 3 of 3 files at r4. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. lib/Runtime/Language/Chakra.Runtime.Language.vcxproj, line 98 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
got you! lib/Runtime/Language/SimdInt64x2Operation.cpp, line 43 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
Will do. We already map test/wasm.simd/int64x2.wast, line 16 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
Hm... interesting. I don't see any trailing whitespaces in this file 😢 test/wasm.simd/int64x2.wast, line 18 at r2 (raw file): Previously, Cellule (Michael Ferris) wrote…
great! I was debating about changing some functions to a stack form, but I realized that this kind of inconsistency would look even worse Comments from Reviewable |
Lettuce do that next!
Could you please rephrase this question a bit; I can't seem to parse it 😕 ? |
Wow that was bad sorry. |
Ah! Let me talk to @arunetm , I think we should be able to run the tests in the private repo now. |
Yes. We will run the private Tests on the branch. |
int64x2 infra int64x2 formatting fixes using scratch area to pass simd vars into helpers sse2 fallbacks cleaned up a test file better seqs removing unused code clean up, add asserts to Extract/Replace, simplify tests add some comments & todos, fix add a header to a project group
8c98360
to
8f25757
Compare
Merge pull request #3490 from Krovatkin:wasm.simd.int64x2 This PR includes: * interpreter handlers + lowerer evaluators for most int64x2 ops (e.g. no conversion ops yet since we need float64x2 for that) * tests <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/microsoft/chakracore/3490) <!-- Reviewable:end -->
Merged... Closing this PR |
This PR includes:
This change is