This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Mark @llvm.wasm.shuffle lane indices as immediates
ClosedPublic

Authored by tlively on May 4 2023, 1:25 PM.

Details

Summary

This intrinsic is meant to lower directly to the i8x16.shuffle instruction,
which takes its lane index arguments as immmediates. The ISel for the intrinsic
assumed that the lane index arguments were constants, so bitcode that
"incorrectly" used this intrinsic with non-immediate arguments caused an
assertion failure in the backend.

Avoid the crash by defining the lane index arguments to be immediates, matching
the underlying instruction. Update ISel accordingly. This change means that the
bitcode that previously caused a crash will now fail to validate.

Fixes #55559.

Diff Detail

Event Timeline

tlively created this revision.May 4 2023, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 1:25 PM
Herald added subscribers: pmatos, asb, wingo and 5 others. · View Herald Transcript
tlively requested review of this revision.May 4 2023, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 1:25 PM
dschuff accepted this revision.May 4 2023, 4:29 PM
This revision is now accepted and ready to land.May 4 2023, 4:29 PM