[PATCH] D140773: [WebAssembly] Use `shufflevector` for shuffle
Thomas Lively via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 12:57:46 PST 2023
tlively accepted this revision.
tlively added a comment.
This revision is now accepted and ready to land.
LGTM % comment. Thanks for taking this!
================
Comment at: llvm/test/CodeGen/WebAssembly/simd-intrinsics.ll:159-160
; CHECK-NEXT: return $pop[[R]]{{$}}
-declare <16 x i8> @llvm.wasm.shuffle(
- <16 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32,
- i32, i32, i32, i32, i32)
define <16 x i8> @shuffle_v16i8(<16 x i8> %x, <16 x i8> %y) {
- %res = call <16 x i8> @llvm.wasm.shuffle(<16 x i8> %x, <16 x i8> %y,
- i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7,
- i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 35)
+ %res = shufflevector <16 x i8> %x, <16 x i8> %y, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23>
ret <16 x i8> %res
----------------
Since this no longer tests codegen for an intrinsic function, could you move it to a separate test file? It could be named something simple and short like `simd-shuffle.ll`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140773/new/
https://reviews.llvm.org/D140773
More information about the cfe-commits
mailing list