This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Arbitrary BUILD_VECTOR and remove i64x2.mul
ClosedPublic

Authored by tlively on Aug 21 2018, 6:41 PM.

Details

Summary

This CL adds support for arbitrary BUILD_VECTORS, i.e. not splats and
not consts. This is the last feature needed to properly lower v2i64
multiplies without a i64x2.mul instruction (which is not in the spec),
so i64x2.mul is removed as well.

Diff Detail

Event Timeline

tlively created this revision.Aug 21 2018, 6:41 PM
dschuff accepted this revision.Aug 22 2018, 3:53 PM
This revision is now accepted and ready to land.Aug 22 2018, 3:53 PM
aheejin added inline comments.Aug 22 2018, 3:54 PM
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
128

What happens if hasSIMD128() == true but not EnableUnimplementedWasmSIMDInstrs?

test/CodeGen/WebAssembly/simd.ll
110

Fix indentation of these three lines so they align with the first line

tlively updated this revision to Diff 162091.Aug 22 2018, 4:02 PM
  • Remove unnecessary condition and fix whitespace
tlively marked 2 inline comments as done.Aug 22 2018, 4:03 PM
tlively added inline comments.
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
128

In that case v2i64 would not be a legal type, so type legalization would expand the op anyway. I suppose the same would happen if hasSIMD128 were false as well, so this entire condition is unnecessary.

This revision was automatically updated to reflect the committed changes.
tlively marked an inline comment as done.