This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use v128.const instead of splats for constants
ClosedPublic

Authored by tlively on Apr 18 2021, 12:24 AM.

Details

Summary

We previously used splats instead of v128.const to materialize vector constants
because V8 did not support v128.const. Now that V8 supports v128.const, we can
use v128.const instead. Although this increases code size, it should also
increase performance (or at least require fewer engine-side optimizations), so
it is an appropriate change to make.

Diff Detail

Event Timeline

tlively created this revision.Apr 18 2021, 12:24 AM
tlively requested review of this revision.Apr 18 2021, 12:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2021, 12:24 AM
aheejin accepted this revision.Apr 18 2021, 1:19 AM
aheejin added inline comments.
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
1163

We can delete this comment now

This revision is now accepted and ready to land.Apr 18 2021, 1:19 AM
tlively added inline comments.Apr 19 2021, 12:36 PM
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
1163

Thanks for the catch!