This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix simd bit shift intrinsics codegen
ClosedPublic

Authored by junparser on Feb 16 2023, 1:25 AM.

Details

Summary

According to github.com/WebAssembly/simd/blob/main/proposals/simd/SIMD.md,
the shift count of bit shift instructions is taken modulo lane width.
This patch adds such operation.

Fixes PR#60655

Diff Detail

Event Timeline

junparser created this revision.Feb 16 2023, 1:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 1:25 AM
junparser requested review of this revision.Feb 16 2023, 1:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 1:25 AM
junparser updated this revision to Diff 497935.Feb 16 2023, 2:09 AM

Replace rem with bitmask operation

mr-c added a subscriber: mr-c.Feb 16 2023, 2:37 AM
tlively accepted this revision.Feb 16 2023, 7:50 AM

LGTM, thanks!

This revision is now accepted and ready to land.Feb 16 2023, 7:50 AM
This revision was automatically updated to reflect the committed changes.