1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown --mattr=+avx,+no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-AVX1
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown --mattr=+avx | FileCheck %s --check-prefixes=CHECK,CHECK-AVX1-DELAY
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown --mattr=+avx2,+no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-AVX2
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown --mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,CHECK-AVX2-DELAY
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server | FileCheck %s --check-prefixes=CHECK,CHECK-ICX,CHECK-ICX-NO-BYPASS-DELAY
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -mattr=-no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-ICX,CHECK-ICX-BYPASS-DELAY
8 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -mattr=+no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-SNB,CHECK-SNB-NO-BYPASS-DELAY
9 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -mattr=-no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-SNB,CHECK-SNB-BYPASS-DELAY
11 define <4 x double> @transform_VPERMILPDYrr(<4 x double> %a) nounwind {
12 ; CHECK-LABEL: transform_VPERMILPDYrr:
14 ; CHECK-NEXT: vshufpd {{.*#+}} ymm0 = ymm0[1,0,2,3]
16 %shufp = shufflevector <4 x double> %a, <4 x double> poison, <4 x i32> <i32 1, i32 0, i32 2, i32 3>
17 ret <4 x double> %shufp
20 define <2 x double> @transform_VPERMILPDrr(<2 x double> %a) nounwind {
21 ; CHECK-LABEL: transform_VPERMILPDrr:
23 ; CHECK-NEXT: vshufpd {{.*#+}} xmm0 = xmm0[1,0]
25 %shufp = shufflevector <2 x double> %a, <2 x double> poison, <2 x i32> <i32 1, i32 0>
26 ret <2 x double> %shufp
29 define <4 x double> @transform_VPERMILPDYrm(ptr %ap) nounwind {
30 ; CHECK-LABEL: transform_VPERMILPDYrm:
32 ; CHECK-NEXT: vpermilpd {{.*#+}} ymm0 = mem[0,1,3,2]
34 %a = load <4 x double>, ptr %ap
35 %shufp = shufflevector <4 x double> %a, <4 x double> poison, <4 x i32> <i32 0, i32 1, i32 3, i32 2>
36 ret <4 x double> %shufp
39 define <2 x double> @transform_VPERMILPDrm(ptr %ap) nounwind {
40 ; CHECK-LABEL: transform_VPERMILPDrm:
42 ; CHECK-NEXT: vpermilpd {{.*#+}} xmm0 = mem[1,0]
44 %a = load <2 x double>, ptr %ap
45 %shufp = shufflevector <2 x double> %a, <2 x double> poison, <2 x i32> <i32 1, i32 0>
46 ret <2 x double> %shufp
48 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
50 ; CHECK-AVX1-DELAY: {{.*}}
52 ; CHECK-AVX2-DELAY: {{.*}}
54 ; CHECK-ICX-BYPASS-DELAY: {{.*}}
55 ; CHECK-ICX-NO-BYPASS-DELAY: {{.*}}
57 ; CHECK-SNB-BYPASS-DELAY: {{.*}}
58 ; CHECK-SNB-NO-BYPASS-DELAY: {{.*}}