• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+vaes,+avx512f,+avx512vl -show-mc-encoding | FileCheck %s --check-prefix=VAES_AVX512VL
2
3define <2 x i64> @test_x86_aesni_aesenc(<2 x i64> %a0, <2 x i64> %a1) {
4; VAES_AVX512VL-LABEL: test_x86_aesni_aesenc:
5; VAES_AVX512VL:       # %bb.0:
6; VAES_AVX512VL-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0xdc,0xc1]
7; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
8  %res = call <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64> %a0, <2 x i64> %a1)
9  ret <2 x i64> %res
10}
11declare <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64>, <2 x i64>) nounwind readnone
12
13define <4 x i64> @test_x86_aesni_aesenc_256(<4 x i64> %a0, <4 x i64> %a1) {
14; VAES_AVX512VL-LABEL: test_x86_aesni_aesenc_256:
15; VAES_AVX512VL:       # %bb.0:
16; VAES_AVX512VL-NEXT:    vaesenc %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0xdc,0xc1]
17; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
18  %res = call <4 x i64> @llvm.x86.aesni.aesenc.256(<4 x i64> %a0, <4 x i64> %a1)
19  ret <4 x i64> %res
20}
21declare <4 x i64> @llvm.x86.aesni.aesenc.256(<4 x i64>, <4 x i64>) nounwind readnone
22
23define <2 x i64> @test_x86_aesni_aesenclast(<2 x i64> %a0, <2 x i64> %a1) {
24; VAES_AVX512VL-LABEL: test_x86_aesni_aesenclast:
25; VAES_AVX512VL:       # %bb.0:
26; VAES_AVX512VL-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0xdd,0xc1]
27; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
28  %res = call <2 x i64> @llvm.x86.aesni.aesenclast(<2 x i64> %a0, <2 x i64> %a1)
29  ret <2 x i64> %res
30}
31declare <2 x i64> @llvm.x86.aesni.aesenclast(<2 x i64>, <2 x i64>) nounwind readnone
32
33define <4 x i64> @test_x86_aesni_aesenclast_256(<4 x i64> %a0, <4 x i64> %a1) {
34; VAES_AVX512VL-LABEL: test_x86_aesni_aesenclast_256:
35; VAES_AVX512VL:       # %bb.0:
36; VAES_AVX512VL-NEXT:    vaesenclast %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0xdd,0xc1]
37; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
38  %res = call <4 x i64> @llvm.x86.aesni.aesenclast.256(<4 x i64> %a0, <4 x i64> %a1)
39  ret <4 x i64> %res
40}
41declare <4 x i64> @llvm.x86.aesni.aesenclast.256(<4 x i64>, <4 x i64>) nounwind readnone
42
43define <2 x i64> @test_x86_aesni_aesdec(<2 x i64> %a0, <2 x i64> %a1) {
44; VAES_AVX512VL-LABEL: test_x86_aesni_aesdec:
45; VAES_AVX512VL:       # %bb.0:
46; VAES_AVX512VL-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0xde,0xc1]
47; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
48  %res = call <2 x i64> @llvm.x86.aesni.aesdec(<2 x i64> %a0, <2 x i64> %a1)
49  ret <2 x i64> %res
50}
51declare <2 x i64> @llvm.x86.aesni.aesdec(<2 x i64>, <2 x i64>) nounwind readnone
52
53define <4 x i64> @test_x86_aesni_aesdec_256(<4 x i64> %a0, <4 x i64> %a1) {
54; VAES_AVX512VL-LABEL: test_x86_aesni_aesdec_256:
55; VAES_AVX512VL:       # %bb.0:
56; VAES_AVX512VL-NEXT:    vaesdec %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0xde,0xc1]
57; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
58  %res = call <4 x i64> @llvm.x86.aesni.aesdec.256(<4 x i64> %a0, <4 x i64> %a1)
59  ret <4 x i64> %res
60}
61declare <4 x i64> @llvm.x86.aesni.aesdec.256(<4 x i64>, <4 x i64>) nounwind readnone
62
63define <2 x i64> @test_x86_aesni_aesdeclast(<2 x i64> %a0, <2 x i64> %a1) {
64; VAES_AVX512VL-LABEL: test_x86_aesni_aesdeclast:
65; VAES_AVX512VL:       # %bb.0:
66; VAES_AVX512VL-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0xdf,0xc1]
67; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
68  %res = call <2 x i64> @llvm.x86.aesni.aesdeclast(<2 x i64> %a0, <2 x i64> %a1)
69  ret <2 x i64> %res
70}
71declare <2 x i64> @llvm.x86.aesni.aesdeclast(<2 x i64>, <2 x i64>) nounwind readnone
72
73define <4 x i64> @test_x86_aesni_aesdeclast_256(<4 x i64> %a0, <4 x i64> %a1) {
74; VAES_AVX512VL-LABEL: test_x86_aesni_aesdeclast_256:
75; VAES_AVX512VL:       # %bb.0:
76; VAES_AVX512VL-NEXT:    vaesdeclast %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0xdf,0xc1]
77; VAES_AVX512VL-NEXT:    retq # encoding: [0xc3]
78  %res = call <4 x i64> @llvm.x86.aesni.aesdeclast.256(<4 x i64> %a0, <4 x i64> %a1)
79  ret <4 x i64> %res
80}
81declare <4 x i64> @llvm.x86.aesni.aesdeclast.256(<4 x i64>, <4 x i64>) nounwind readnone
82
83