This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Handle multiple loads of splatted loads
ClosedPublic

Authored by tlively on Oct 30 2019, 1:37 PM.

Details

Summary

Fixes an ISel failure when a splatted load is used more than once. The
failure was due to the hacks we were doing in ISel lowering to
preserve the original load as the operand of a LOAD_SPLAT node. The
fix is to properly lower the splatted use of the load to a separate
LOAD_SPLAT node.

Diff Detail

Event Timeline

tlively created this revision.Oct 30 2019, 1:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 30 2019, 1:37 PM
aheejin accepted this revision.Oct 30 2019, 7:28 PM

LGTM. It's interesting that we can use MemIntrinsicNode for this purpose even if it's not an intrinsic...
(I guess we can also use MachineSDNode because we are effectively doing isel before we reach tablegen, but given that we've used it only in WebAssemblyISelDAGToDAG.cpp and we do most custom SIMD lowering in WebAssemblyISelLowering.cpp, this looks like a good trick.)

This revision is now accepted and ready to land.Oct 30 2019, 7:28 PM
This revision was automatically updated to reflect the committed changes.