[PATCH] D80164: [WebAssembly] Fix bug in custom shuffle combine

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 20:21:42 PDT 2020


tlively added a comment.

In D80164#2044958 <https://reviews.llvm.org/D80164#2044958>, @aheejin wrote:

> In D80164#2043610 <https://reviews.llvm.org/D80164#2043610>, @aheejin wrote:
>
> > LGTM.
> >
> > A separate question: In wasm_simd128.h <https://github.com/llvm/llvm-project/blob/master/clang/lib/Headers/wasm_simd128.h>, why are the type for all return values `v128_t`? If we don't cast return types to `v128_t` <https://github.com/llvm/llvm-project/blob/56079e1de1129837aa7569d8b3bb5e50afc0f1ea/clang/lib/Headers/wasm_simd128.h#L315> and return `__f32x4` as is, are bitcasts still gonna be generated?
>
>
> Ping


Sorry for the very delayed response. No, without those casts there are no bitcasts generated. For some reason I don't understand, though, the bit casts are generated in a different order when the input and output type have the same number of elements. This is why the problem only showed up for `wasm_f32x4_splat`. If I changed the definition of `v128_t` to be the same as `__i64x2`, I got the same issue with `wasm_f64x2_splat` instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80164





More information about the llvm-commits mailing list