[PATCH] D99536: [WebAssembly] Fix i8x16.popcnt opcode

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 29 17:23:26 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa1b8b0739a34: [WebAssembly] Fix i8x16.popcnt opcode (authored by tlively).

Repository:
  rG LLVM Github Monorepo

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

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.334019.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/1a0b01f1/attachment.bin>


More information about the llvm-commits mailing list