This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix SIMD shift unrolling to avoid assertion failure
ClosedPublic

Authored by tlively on Mar 11 2020, 9:47 PM.

Details

Summary

Using the default DAG.UnrollVectorOp on v16i8 and v8i16 vectors
results in i8 or i16 nodes being inserted into the SelectionDAG. Since
those are illegal types, this causes a legalization assertion failure
for some code patterns, as uncovered by PR45178. This change unrolls
shifts manually to avoid this issue by adding and using a new optional
EVT argument to DAG.ExtractVectorElements to control the type of the
extract_element nodes.

Diff Detail

Event Timeline

tlively created this revision.Mar 11 2020, 9:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2020, 9:47 PM
dschuff accepted this revision.Mar 12 2020, 11:33 AM
This revision is now accepted and ready to land.Mar 12 2020, 11:33 AM
This revision was automatically updated to reflect the committed changes.