Skip to content

Commit 68f3b37

Browse files
tlivelynikic
authored andcommitted
[WebAssembly] Fix i8x16.popcnt opcode
When I updated the SIMD opcodes in f5764a8, I accidentally missed updating i8x16.popcnt. This patch fixes the omission. Differential Revision: https://reviews.llvm.org/D99536
1 parent e81f64b commit 68f3b37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ defm ANYTRUE : SIMDReduce<int_wasm_anytrue, "any_true", 98>;
831831
defm ALLTRUE : SIMDReduce<int_wasm_alltrue, "all_true", 99>;
832832

833833
// Population count: popcnt
834-
defm POPCNT : SIMDUnary<I8x16, int_wasm_popcnt, "popcnt", 124>;
834+
defm POPCNT : SIMDUnary<I8x16, int_wasm_popcnt, "popcnt", 0x62>;
835835

836836
// Reductions already return 0 or 1, so and 1, setne 0, and seteq 1
837837
// can be folded out

llvm/test/MC/WebAssembly/simd-encodings.s

+2-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ main:
324324
# CHECK: i8x16.neg # encoding: [0xfd,0x61]
325325
i8x16.neg
326326

327-
# TODO: i8x16.popcnt # encoding: [0xfd,0x62]
327+
# CHECK: i8x16.popcnt # encoding: [0xfd,0x62]
328+
i8x16.popcnt
328329

329330
# CHECK: i8x16.all_true # encoding: [0xfd,0x63]
330331
i8x16.all_true

0 commit comments

Comments
 (0)