From 995ad61f231aa35e9c57db9af43ca56c41d351d0 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 28 Aug 2018 18:31:15 +0000 Subject: [WebAssembly] v128.not Implementation and tests. llvm-svn: 340857 --- llvm/test/CodeGen/WebAssembly/simd-arith.ll | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'llvm/test/CodeGen/WebAssembly') diff --git a/llvm/test/CodeGen/WebAssembly/simd-arith.ll b/llvm/test/CodeGen/WebAssembly/simd-arith.ll index ed927340818..3f2e4de3ed0 100644 --- a/llvm/test/CodeGen/WebAssembly/simd-arith.ll +++ b/llvm/test/CodeGen/WebAssembly/simd-arith.ll @@ -79,6 +79,20 @@ define <16 x i8> @xor_v16i8(<16 x i8> %x, <16 x i8> %y) { ret <16 x i8> %a } +; CHECK-LABEL: not_v16i8 +; NO-SIMD128-NOT: v128 +; SIMD128: .param v128{{$}} +; SIMD128: .result v128{{$}} +; SIMD128: v128.not $push0=, $0 # encoding: [0xfd,0x3e]{{$}} +; SIMD128: return $pop0 # +define <16 x i8> @not_v16i8(<16 x i8> %x) { + %a = xor <16 x i8> %x, + ret <16 x i8> %a +} + ; ============================================================================== ; 8 x i16 ; ============================================================================== @@ -148,6 +162,18 @@ define <8 x i16> @xor_v8i16(<8 x i16> %x, <8 x i16> %y) { ret <8 x i16> %a } +; CHECK-LABEL: not_v8i16 +; NO-SIMD128-NOT: v128 +; SIMD128: .param v128{{$}} +; SIMD128: .result v128{{$}} +; SIMD128: v128.not $push0=, $0 # encoding: [0xfd,0x3e]{{$}} +; SIMD128: return $pop0 # +define <8 x i16> @not_v8i16(<8 x i16> %x) { + %a = xor <8 x i16> %x, + ret <8 x i16> %a +} + ; ============================================================================== ; 4 x i32 ; ============================================================================== @@ -217,6 +243,17 @@ define <4 x i32> @xor_v4i32(<4 x i32> %x, <4 x i32> %y) { ret <4 x i32> %a } +; CHECK-LABEL: not_v4i32 +; NO-SIMD128-NOT: v128 +; SIMD128: .param v128{{$}} +; SIMD128: .result v128{{$}} +; SIMD128: v128.not $push0=, $0 # encoding: [0xfd,0x3e]{{$}} +; SIMD128: return $pop0 # +define <4 x i32> @not_v4i32(<4 x i32> %x) { + %a = xor <4 x i32> %x, + ret <4 x i32> %a +} + ; ============================================================================== ; 2 x i64 ; ============================================================================== @@ -289,6 +326,18 @@ define <2 x i64> @xor_v2i64(<2 x i64> %x, <2 x i64> %y) { ret <2 x i64> %a } +; CHECK-LABEL: not_v2i64 +; NO-SIMD128-NOT: v128 +; SIMD128-VM-NOT: v128 +; SIMD128: .param v128{{$}} +; SIMD128: .result v128{{$}} +; SIMD128: v128.not $push0=, $0 # encoding: [0xfd,0x3e]{{$}} +; SIMD128: return $pop0 # +define <2 x i64> @not_v2i64(<2 x i64> %x) { + %a = xor <2 x i64> %x, + ret <2 x i64> %a +} + ; ============================================================================== ; 4 x float ; ============================================================================== -- cgit v1.2.3