[PATCH] D108496: [WebAssembly] Lower v2f32 to v2f64 extending loads with promote_low

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 10:00:52 PDT 2021


tlively added a comment.

In D108496#2970332 <https://reviews.llvm.org/D108496#2970332>, @aheejin wrote:

> Thanks for the explanation! Then after this CL, does `promote_low` part for LowerConvertLow <https://github.com/llvm/llvm-project/blob/4387975170112ad51a6cb57b5b77ebd72cc73c57/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp#L1781-L1844> become redundant? Hmm, maybe not completely, because this has a capability of shuffling <https://github.com/llvm/llvm-project/blob/4387975170112ad51a6cb57b5b77ebd72cc73c57/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp#L1837-L1842>? (By the way we don't seem to have a test of shuffled `promote_low` case.. simd-conversions.ll <https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/WebAssembly/simd-conversions.ll> only contains integer vector to v2f64 tests. It would be good to have one for float vectors to v2f64 too) But given that `LowerConvertLow` function also takes care of integer to float conversions, we cannot remove that function anyway though. (Unless we do a similar optimization for integer vectors)

That lowering is used in cases where there is no load, so I don't think it's redundant. We also already have tests for float to double promote_low and one test that uses the shuffle behavior: https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/WebAssembly/simd-conversions.ll#L431-L443


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108496/new/

https://reviews.llvm.org/D108496



More information about the llvm-commits mailing list