Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td @@ -559,17 +559,17 @@ vec#"."#name#"\t$dst, $vec", vec#"."#name, simdop>; } +// Bitwise logic: v128.not +foreach vec_t = [v16i8, v8i16, v4i32, v2i64] in +defm NOT: SIMDUnary; + // Bitwise logic: v128.and / v128.or / v128.xor let isCommutable = 1 in { -defm AND : SIMDBitwise; -defm OR : SIMDBitwise; -defm XOR : SIMDBitwise; +defm AND : SIMDBitwise; +defm OR : SIMDBitwise; +defm XOR : SIMDBitwise; } // isCommutable = 1 -// Bitwise logic: v128.not -foreach vec_t = [v16i8, v8i16, v4i32, v2i64] in -defm NOT: SIMDUnary; - // Bitwise select: v128.bitselect foreach vec_t = [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64] in defm BITSELECT_#vec_t : Index: llvm/trunk/test/MC/WebAssembly/simd-encodings.s =================================================================== --- llvm/trunk/test/MC/WebAssembly/simd-encodings.s +++ llvm/trunk/test/MC/WebAssembly/simd-encodings.s @@ -226,18 +226,18 @@ # CHECK: f64x2.ge # encoding: [0xfd,0x4b] f64x2.ge - # CHECK: v128.and # encoding: [0xfd,0x4c] + # CHECK: v128.not # encoding: [0xfd,0x4c] + v128.not + + # CHECK: v128.and # encoding: [0xfd,0x4d] v128.and - # CHECK: v128.or # encoding: [0xfd,0x4d] + # CHECK: v128.or # encoding: [0xfd,0x4e] v128.or - # CHECK: v128.xor # encoding: [0xfd,0x4e] + # CHECK: v128.xor # encoding: [0xfd,0x4f] v128.xor - # CHECK: v128.not # encoding: [0xfd,0x4f] - v128.not - # CHECK: v128.bitselect # encoding: [0xfd,0x50] v128.bitselect