[PATCH] D99536: [WebAssembly] Fix i8x16.popcnt opcode
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 29 13:23:08 PDT 2021
tlively created this revision.
tlively added reviewers: aheejin, dschuff.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
tlively requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When I updated the SIMD opcodes in f5764a8654e3 <https://reviews.llvm.org/rGf5764a8654e3caa6ca5dab3a89238c165062228f>, I accidentally missed updating
i8x16.popcnt. This patch fixes the omission.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99536
Files:
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
llvm/test/MC/WebAssembly/simd-encodings.s
Index: llvm/test/MC/WebAssembly/simd-encodings.s
===================================================================
--- llvm/test/MC/WebAssembly/simd-encodings.s
+++ llvm/test/MC/WebAssembly/simd-encodings.s
@@ -324,7 +324,8 @@
# CHECK: i8x16.neg # encoding: [0xfd,0x61]
i8x16.neg
- # TODO: i8x16.popcnt # encoding: [0xfd,0x62]
+ # CHECK: i8x16.popcnt # encoding: [0xfd,0x62]
+ i8x16.popcnt
# CHECK: i8x16.all_true # encoding: [0xfd,0x63]
i8x16.all_true
Index: llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
+++ llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
@@ -832,7 +832,7 @@
defm ALLTRUE : SIMDReduce<int_wasm_alltrue, "all_true", 99>;
// Population count: popcnt
-defm POPCNT : SIMDUnary<I8x16, int_wasm_popcnt, "popcnt", 124>;
+defm POPCNT : SIMDUnary<I8x16, int_wasm_popcnt, "popcnt", 0x62>;
// Reductions already return 0 or 1, so and 1, setne 0, and seteq 1
// can be folded out
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99536.333971.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210329/9efb370f/attachment.bin>
More information about the llvm-commits
mailing list