Gates v128.const, f32x4.sqrt, f32x4.div, i8x16.extract_lane_u, and
i16x8.extract_lane_u on the --wasm-enable-unimplemented-simd flag,
since these ops are not implemented yet in V8.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Looks like it is not easy to only guard f32x4 type in td files in the current implementation. If we make sure we expand them in ISel, do we need a separate guard for td files?
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
731 ↗ | (On Diff #178973) | Doesn't this guard both f32x4.sqrt and f64x2.sqrt? |
755 ↗ | (On Diff #178973) | Doesn't this guard both f32x4.div and f64x2.div? |
Yes, unfortunately. FastISel will emit f32x4.div and f32x4.sqrt unless we have the predicates in the td files, and instruction selection will fail unless we explicitly expand these ops in WebAssemblyISelLowering.cpp, so we need both. An alternative is to add logic FastISel to bail whenever it sees any SIMD, which would probably also be fine.
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
731 ↗ | (On Diff #178973) | Yes, but that's ok because f64x2.sqrt is also not implemented in v8. All f64x2 and i64x2 ops are already gated on this flag prior to this CL. |
755 ↗ | (On Diff #178973) | same here. |