This is an archive of the discontinued LLVM Phabricator instance.

[WASM] Prevent casting `undef` to `CosntantSDNode`
ClosedPublic

Authored by Peter on Mar 29 2023, 10:13 PM.

Details

Summary

WebAssembly tries to cast an undef to CosntantSDNode during LowerAccessVectorElement.
These operations will trigger an assertion error in cast.
To avoid this issue, we prevent casting, and abort the lowering operation.
A unit test is also included.

This patch fixes pr61828

Diff Detail

Event Timeline

Peter created this revision.Mar 29 2023, 10:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 10:13 PM
Peter requested review of this revision.Mar 29 2023, 10:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 10:13 PM
Peter retitled this revision from [WASM] Fix [pr61828](https://github.com/llvm/llvm-project/issues/61828) to [WASM] Prevent casting `undef` to `CosntantSDNode`.Mar 29 2023, 10:14 PM
Peter edited the summary of this revision. (Show Details)
Peter added reviewers: aheejin, luke957.
Peter updated this revision to Diff 509549.Mar 29 2023, 10:20 PM

precommit format changes

tlively accepted this revision.Mar 30 2023, 9:20 AM
tlively added a subscriber: tlively.

Thanks!

This revision is now accepted and ready to land.Mar 30 2023, 9:20 AM
This revision was automatically updated to reflect the committed changes.