1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown -mattr=+sse2,+pclmul | FileCheck %s --check-prefix=SSE
3 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown -mattr=+avx2,+pclmul | FileCheck %s --check-prefix=AVX
4 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown -mattr=+avx512vl,+vpclmulqdq | FileCheck %s --check-prefix=AVX
6 declare <2 x i64> @llvm.x86.pclmulqdq(<2 x i64>, <2 x i64>, i8) nounwind readnone
8 define <2 x i64> @commute_lq_lq(<2 x i64>* %a0, <2 x i64> %a1) #0 {
9 ; SSE-LABEL: commute_lq_lq:
11 ; SSE-NEXT: pclmulqdq $0, (%rdi), %xmm0
14 ; AVX-LABEL: commute_lq_lq:
16 ; AVX-NEXT: vpclmulqdq $0, (%rdi), %xmm0, %xmm0
18 %1 = load <2 x i64>, <2 x i64>* %a0
19 %2 = call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %1, <2 x i64> %a1, i8 0)
23 define <2 x i64> @commute_lq_hq(<2 x i64>* %a0, <2 x i64> %a1) #0 {
24 ; SSE-LABEL: commute_lq_hq:
26 ; SSE-NEXT: pclmulqdq $1, (%rdi), %xmm0
29 ; AVX-LABEL: commute_lq_hq:
31 ; AVX-NEXT: vpclmulqdq $1, (%rdi), %xmm0, %xmm0
33 %1 = load <2 x i64>, <2 x i64>* %a0
34 %2 = call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %1, <2 x i64> %a1, i8 16)
38 define <2 x i64> @commute_hq_lq(<2 x i64>* %a0, <2 x i64> %a1) #0 {
39 ; SSE-LABEL: commute_hq_lq:
41 ; SSE-NEXT: pclmulqdq $16, (%rdi), %xmm0
44 ; AVX-LABEL: commute_hq_lq:
46 ; AVX-NEXT: vpclmulqdq $16, (%rdi), %xmm0, %xmm0
48 %1 = load <2 x i64>, <2 x i64>* %a0
49 %2 = call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %1, <2 x i64> %a1, i8 1)
53 define <2 x i64> @commute_hq_hq(<2 x i64>* %a0, <2 x i64> %a1) #0 {
54 ; SSE-LABEL: commute_hq_hq:
56 ; SSE-NEXT: pclmulqdq $17, (%rdi), %xmm0
59 ; AVX-LABEL: commute_hq_hq:
61 ; AVX-NEXT: vpclmulqdq $17, (%rdi), %xmm0, %xmm0
63 %1 = load <2 x i64>, <2 x i64>* %a0
64 %2 = call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %1, <2 x i64> %a1, i8 17)