diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td @@ -832,7 +832,7 @@ defm ALLTRUE : SIMDReduce; // Population count: popcnt -defm POPCNT : SIMDUnary; +defm POPCNT : SIMDUnary; // Reductions already return 0 or 1, so and 1, setne 0, and seteq 1 // can be folded out diff --git a/llvm/test/MC/WebAssembly/simd-encodings.s b/llvm/test/MC/WebAssembly/simd-encodings.s --- a/llvm/test/MC/WebAssembly/simd-encodings.s +++ b/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