This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Lower SCALAR_TO_VECTOR to splats
ClosedPublic

Authored by tlively on Jan 25 2019, 4:45 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

tlively created this revision.Jan 25 2019, 4:45 PM
aheejin added inline comments.Jan 26 2019, 8:22 PM
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
240 ↗(On Diff #183662)

Do we need truncation in these cases?

llvm/test/CodeGen/WebAssembly/simd-scalar-to-vector.ll
5 ↗(On Diff #183662)

Adding DAG printed by -debug or some explanation on which part of the code becomes scalar_to_vector might help reading.

8 ↗(On Diff #183662)

No need for -wasm

tlively updated this revision to Diff 184011.Jan 28 2019, 8:15 PM
tlively marked 2 inline comments as done.
  • Address comments
tlively added inline comments.Jan 28 2019, 8:58 PM
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
240 ↗(On Diff #183662)

I don't think so. This should hopefully only extend arguments of the lane element type. These may be legalized to i32, but as far as I can tell the splat instructions just do the masking implicitly anyway.

aheejin accepted this revision.Jan 29 2019, 2:28 PM
aheejin added inline comments.
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
240 ↗(On Diff #183662)

Ah, right. Thanks.

This revision is now accepted and ready to land.Jan 29 2019, 2:28 PM
This revision was automatically updated to reflect the committed changes.