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.

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

Do we need truncation in these cases?

llvm/test/CodeGen/WebAssembly/simd-scalar-to-vector.ll
6

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

9

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

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

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.