This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add missing SIMD instruction attributes
ClosedPublic

Authored by tlively on Aug 30 2018, 3:09 PM.

Details

Summary

These attributes are copied from equivalent instructions in
WebAssemblyInstrInfo.td.

Diff Detail

Repository
rL LLVM

Event Timeline

tlively created this revision.Aug 30 2018, 3:09 PM
tlively added inline comments.Aug 30 2018, 3:13 PM
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
22 ↗(On Diff #163426)

I actually have no idea what isReMaterializable means, but the other const instructions had it.

dschuff added inline comments.Aug 30 2018, 3:16 PM
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
29 ↗(On Diff #163426)

I don't think loads and stores are really as cheap as a move (I think "move" means the RISC definition of a move, i.e. "not also a load"). Also wasm loads and stores are potentially more expensive than x86 loads and stores anyway if bounds checking is not free.

tlively updated this revision to Diff 163433.Aug 30 2018, 3:39 PM
  • Remove isAsCheapAsAMove from mem ops
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
29 ↗(On Diff #163426)

You're right, I think I got these loads and stores mixed up with set_local/get_local.

aheejin added inline comments.Aug 30 2018, 4:55 PM
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
22 ↗(On Diff #163426)

Is isAsCheapAsAMove true for this? Because it basically means putting 128-bit worth of values onto the stack.

tlively added inline comments.Aug 30 2018, 5:37 PM
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
22 ↗(On Diff #163426)

Not actually sure, especially when you think about what this instruction turns into on the backend. I could imagine that for some embedders this is as cheap as a move and for others it is not.

tlively updated this revision to Diff 165188.Sep 12 2018, 5:44 PM
  • Remove isAsCheapAsAMove from v128.const
aheejin accepted this revision.Sep 12 2018, 6:56 PM
This revision is now accepted and ready to land.Sep 12 2018, 6:56 PM
This revision was automatically updated to reflect the committed changes.