This replaces the old ad-hoc -wasm-enable-unimplemented-simd
flag. Also makes the new unimplemented-simd128 feature imply the
simd128 feature.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 26563 Build 26562: arc lint + arc unit
Event Timeline
I thought the unimplemented SIMD thing was a temporary workaround. Are they not planned to be implemented in V8 for a long time so that we should make it as a feature?
lib/Target/WebAssembly/WebAssembly.td | ||
---|---|---|
32 | Didn't know we can specify dependences in features! Cool. | |
test/CodeGen/WebAssembly/simd-arith.ll | ||
127 | Why are there changes in the test results in this file? |
test/CodeGen/WebAssembly/simd-arith.ll | ||
---|---|---|
127 | Probably because the new implicit enabling of the sign-ext feature made sign_ext_inreg legal, which led to the explicit selection of extract_lane_s. Before extract_lane_s was being selected only because it was the default for an any_extend, which was then sign extended via the shifts. |
(We talked in person and decided not to make simd feature depend on signext)
Nice! Can we have a comment on the code why we are doing that? Basically what we've talked about - SIMD implementation needs signext_inreg for clean implementation but that doesn't mean we require signext feature to enable simd feature, so we are doing this... something like that
And I think we should revert the test changes now?
Good idea about the comment. The changes to the test should actually stay because the new test results are the better code that is produced when the sext_inreg node is matched on.
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
1104 | Hmm, the purpose of this comment is when other people who don't have any context of our discussions see this they would understand why it's done this way. I'm not sure if I can understand this if I'm not the one who had the discussion. At least I think we'd better to add that while simd128 feature does not requires signext feature's functionality, signext_inreg isel node allows us cleaner implementation of vector extract patterns in simd128, so we want to make use of that to implement the patterns even when signext feature is off. |
Didn't know we can specify dependences in features! Cool.