This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Prototype i8x16 to i32x4 widening instructions
ClosedPublic

Authored by tlively on Jan 27 2021, 1:39 PM.

Diff Detail

Event Timeline

tlively created this revision.Jan 27 2021, 1:39 PM
tlively requested review of this revision.Jan 27 2021, 1:39 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 27 2021, 1:39 PM
aheejin accepted this revision.Jan 28 2021, 3:02 AM

This does not yet have i64x2 version of the instructions in https://github.com/WebAssembly/simd/pull/395 yet, right?

llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
1279

I think this is the first time we use timm in this file... Haven't we used LaneIdxN for these? The same for WIDEN_I8x16_TO_I32x4_U.

This revision is now accepted and ready to land.Jan 28 2021, 3:02 AM
tlively added inline comments.Jan 28 2021, 10:49 AM
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
1279

Yes, this is the first use of timm. I needed to use timm instead of imm (or a LaneIdxN, which is just a restricted imm) because immarg arguments are apparently lowered to TargetConstant nodes rather than Constant nodes. This is also the first time I've used an immarg arument in one of the intrinsics, but I should definitely use them for many other intrinsics as well, and probably change LaneIdxN to be based on timm rather than imm. Since these are just prototype instructions, I am ok with them working differently from other instructions for now.

This does not yet have i64x2 version of the instructions in https://github.com/WebAssembly/simd/pull/395 yet, right?

Yes, that's intentional. These are the only versions implemented in V8 as well.

This revision was landed with ongoing or failed builds.Jan 28 2021, 10:59 AM
This revision was automatically updated to reflect the committed changes.