1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+ssse3 -show-mc-encoding | FileCheck %s --check-prefix=SSE
3 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefix=AVX1
4 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl -show-mc-encoding | FileCheck %s --check-prefix=AVX512
5 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+ssse3 -show-mc-encoding | FileCheck %s --check-prefix=SSE
6 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefix=AVX1
7 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl -show-mc-encoding | FileCheck %s --check-prefix=AVX512
9 define <16 x i8> @test_x86_ssse3_pabs_b_128(<16 x i8> %a0) {
10 ; SSE-LABEL: test_x86_ssse3_pabs_b_128:
12 ; SSE-NEXT: pabsb %xmm0, %xmm0 ## encoding: [0x66,0x0f,0x38,0x1c,0xc0]
13 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
15 ; AVX1-LABEL: test_x86_ssse3_pabs_b_128:
17 ; AVX1-NEXT: vpabsb %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x1c,0xc0]
18 ; AVX1-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
20 ; AVX512-LABEL: test_x86_ssse3_pabs_b_128:
22 ; AVX512-NEXT: vpabsb %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x1c,0xc0]
23 ; AVX512-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
24 %res = call <16 x i8> @llvm.x86.ssse3.pabs.b.128(<16 x i8> %a0) ; <<16 x i8>> [#uses=1]
27 declare <16 x i8> @llvm.x86.ssse3.pabs.b.128(<16 x i8>) nounwind readnone
30 define <4 x i32> @test_x86_ssse3_pabs_d_128(<4 x i32> %a0) {
31 ; SSE-LABEL: test_x86_ssse3_pabs_d_128:
33 ; SSE-NEXT: pabsd %xmm0, %xmm0 ## encoding: [0x66,0x0f,0x38,0x1e,0xc0]
34 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
36 ; AVX1-LABEL: test_x86_ssse3_pabs_d_128:
38 ; AVX1-NEXT: vpabsd %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x1e,0xc0]
39 ; AVX1-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
41 ; AVX512-LABEL: test_x86_ssse3_pabs_d_128:
43 ; AVX512-NEXT: vpabsd %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x1e,0xc0]
44 ; AVX512-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
45 %res = call <4 x i32> @llvm.x86.ssse3.pabs.d.128(<4 x i32> %a0) ; <<4 x i32>> [#uses=1]
48 declare <4 x i32> @llvm.x86.ssse3.pabs.d.128(<4 x i32>) nounwind readnone
51 define <8 x i16> @test_x86_ssse3_pabs_w_128(<8 x i16> %a0) {
52 ; SSE-LABEL: test_x86_ssse3_pabs_w_128:
54 ; SSE-NEXT: pabsw %xmm0, %xmm0 ## encoding: [0x66,0x0f,0x38,0x1d,0xc0]
55 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
57 ; AVX1-LABEL: test_x86_ssse3_pabs_w_128:
59 ; AVX1-NEXT: vpabsw %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x1d,0xc0]
60 ; AVX1-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
62 ; AVX512-LABEL: test_x86_ssse3_pabs_w_128:
64 ; AVX512-NEXT: vpabsw %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x1d,0xc0]
65 ; AVX512-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
66 %res = call <8 x i16> @llvm.x86.ssse3.pabs.w.128(<8 x i16> %a0) ; <<8 x i16>> [#uses=1]
69 declare <8 x i16> @llvm.x86.ssse3.pabs.w.128(<8 x i16>) nounwind readnone