This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix crash when selecting 64 bit lane extract operand
ClosedPublic

Authored by luke on Dec 16 2022, 4:28 AM.

Details

Summary

The tablegen patterns on vector_extract only match i32 constants, but
on wasm64 these come in as i64 constants. In certain situations this
would cause crashes whenever it couldn't select an extract_vector_elt
instruction.
Rather than add duplicate patterns for every instruction, this just
canonicalizes the constant to be i32 when lowering.
Fixes https://github.com/llvm/llvm-project/issues/57577.

Diff Detail

Event Timeline

luke created this revision.Dec 16 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2022, 4:28 AM
luke requested review of this revision.Dec 16 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2022, 4:28 AM
luke updated this revision to Diff 483492.Dec 16 2022, 4:29 AM

Fix typo

aheejin edited the summary of this revision. (Show Details)Dec 16 2022, 11:29 AM
aheejin accepted this revision.EditedDec 16 2022, 12:29 PM

Thank you!

(Btw I edited the CL description to include the bug issue in the llvm repo. If you include "Fixes https://github.com/llvm/llvm-project/issues/57577" in the commit message as well, it will automatically close that issue when committed.)

This revision is now accepted and ready to land.Dec 16 2022, 12:29 PM
luke updated this revision to Diff 483883.Dec 19 2022, 1:49 AM

Update commit messaage with github link

This revision was landed with ongoing or failed builds.Dec 19 2022, 2:37 AM
This revision was automatically updated to reflect the committed changes.