This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix ISel crash in SIGN_EXTEND_INREG lowering
ClosedPublic

Authored by tlively on Jun 2 2020, 12:11 PM.

Details

Summary

The code previously assumed that the index of a vector extract was
constant, but this was not always true. This patch fixes the problem
by bailing out of the lowering if the index is nonconstant and also
replaces static_casts in the lowering function with casts because
the latter contain type-checking asserts that would make similar
issues easier to find and debug.

Diff Detail

Event Timeline

tlively created this revision.Jun 2 2020, 12:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2020, 12:11 PM
aheejin accepted this revision.Jun 3 2020, 10:21 AM
This revision is now accepted and ready to land.Jun 3 2020, 10:21 AM
This revision was automatically updated to reflect the committed changes.