Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+aes | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC
      3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=slm | FileCheck %s --check-prefix=CHECK --check-prefix=SLM
      4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=goldmont | FileCheck %s --check-prefix=CHECK --check-prefix=SLM
      5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=sandybridge -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,SANDY-SSE
      6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=sandybridge -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,SANDY
      7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,SANDY-SSE
      8 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,SANDY
      9 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,HASWELL-SSE
     10 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,HASWELL
     11 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=broadwell -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,BROADWELL-SSE
     12 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=broadwell -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,BROADWELL
     13 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,SKYLAKE-SSE
     14 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,SKYLAKE
     15 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skx -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,SKX-SSE
     16 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skx -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,SKX
     17 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,BTVER2-SSE
     18 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,BTVER2
     19 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 -mattr=-avx  | FileCheck %s --check-prefixes=CHECK,ZNVER1-SSE
     20 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 -mattr=-avx2 | FileCheck %s --check-prefixes=CHECK,ZNVER1
     21 
     22 define <2 x i64> @test_aesdec(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
     23 ; GENERIC-LABEL: test_aesdec:
     24 ; GENERIC:       # %bb.0:
     25 ; GENERIC-NEXT:    aesdec %xmm1, %xmm0 # sched: [7:1.00]
     26 ; GENERIC-NEXT:    aesdec (%rdi), %xmm0 # sched: [13:1.00]
     27 ; GENERIC-NEXT:    retq # sched: [1:1.00]
     28 ;
     29 ; SLM-LABEL: test_aesdec:
     30 ; SLM:       # %bb.0:
     31 ; SLM-NEXT:    aesdec %xmm1, %xmm0 # sched: [8:5.00]
     32 ; SLM-NEXT:    aesdec (%rdi), %xmm0 # sched: [8:5.00]
     33 ; SLM-NEXT:    retq # sched: [4:1.00]
     34 ;
     35 ; SANDY-SSE-LABEL: test_aesdec:
     36 ; SANDY-SSE:       # %bb.0:
     37 ; SANDY-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [7:1.00]
     38 ; SANDY-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [13:1.00]
     39 ; SANDY-SSE-NEXT:    retq # sched: [1:1.00]
     40 ;
     41 ; SANDY-LABEL: test_aesdec:
     42 ; SANDY:       # %bb.0:
     43 ; SANDY-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
     44 ; SANDY-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
     45 ; SANDY-NEXT:    retq # sched: [1:1.00]
     46 ;
     47 ; HASWELL-SSE-LABEL: test_aesdec:
     48 ; HASWELL-SSE:       # %bb.0:
     49 ; HASWELL-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [7:1.00]
     50 ; HASWELL-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [13:1.00]
     51 ; HASWELL-SSE-NEXT:    retq # sched: [7:1.00]
     52 ;
     53 ; HASWELL-LABEL: test_aesdec:
     54 ; HASWELL:       # %bb.0:
     55 ; HASWELL-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
     56 ; HASWELL-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
     57 ; HASWELL-NEXT:    retq # sched: [7:1.00]
     58 ;
     59 ; BROADWELL-SSE-LABEL: test_aesdec:
     60 ; BROADWELL-SSE:       # %bb.0:
     61 ; BROADWELL-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [7:1.00]
     62 ; BROADWELL-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [12:1.00]
     63 ; BROADWELL-SSE-NEXT:    retq # sched: [7:1.00]
     64 ;
     65 ; BROADWELL-LABEL: test_aesdec:
     66 ; BROADWELL:       # %bb.0:
     67 ; BROADWELL-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
     68 ; BROADWELL-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [12:1.00]
     69 ; BROADWELL-NEXT:    retq # sched: [7:1.00]
     70 ;
     71 ; SKYLAKE-SSE-LABEL: test_aesdec:
     72 ; SKYLAKE-SSE:       # %bb.0:
     73 ; SKYLAKE-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [4:1.00]
     74 ; SKYLAKE-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [10:1.00]
     75 ; SKYLAKE-SSE-NEXT:    retq # sched: [7:1.00]
     76 ;
     77 ; SKYLAKE-LABEL: test_aesdec:
     78 ; SKYLAKE:       # %bb.0:
     79 ; SKYLAKE-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
     80 ; SKYLAKE-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
     81 ; SKYLAKE-NEXT:    retq # sched: [7:1.00]
     82 ;
     83 ; SKX-SSE-LABEL: test_aesdec:
     84 ; SKX-SSE:       # %bb.0:
     85 ; SKX-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [4:1.00]
     86 ; SKX-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [10:1.00]
     87 ; SKX-SSE-NEXT:    retq # sched: [7:1.00]
     88 ;
     89 ; SKX-LABEL: test_aesdec:
     90 ; SKX:       # %bb.0:
     91 ; SKX-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
     92 ; SKX-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
     93 ; SKX-NEXT:    retq # sched: [7:1.00]
     94 ;
     95 ; BTVER2-SSE-LABEL: test_aesdec:
     96 ; BTVER2-SSE:       # %bb.0:
     97 ; BTVER2-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [3:1.00]
     98 ; BTVER2-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [8:1.00]
     99 ; BTVER2-SSE-NEXT:    retq # sched: [4:1.00]
    100 ;
    101 ; BTVER2-LABEL: test_aesdec:
    102 ; BTVER2:       # %bb.0:
    103 ; BTVER2-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
    104 ; BTVER2-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [8:1.00]
    105 ; BTVER2-NEXT:    retq # sched: [4:1.00]
    106 ;
    107 ; ZNVER1-SSE-LABEL: test_aesdec:
    108 ; ZNVER1-SSE:       # %bb.0:
    109 ; ZNVER1-SSE-NEXT:    aesdec %xmm1, %xmm0 # sched: [4:0.50]
    110 ; ZNVER1-SSE-NEXT:    aesdec (%rdi), %xmm0 # sched: [11:0.50]
    111 ; ZNVER1-SSE-NEXT:    retq # sched: [1:0.50]
    112 ;
    113 ; ZNVER1-LABEL: test_aesdec:
    114 ; ZNVER1:       # %bb.0:
    115 ; ZNVER1-NEXT:    vaesdec %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
    116 ; ZNVER1-NEXT:    vaesdec (%rdi), %xmm0, %xmm0 # sched: [11:0.50]
    117 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
    118   %1 = load <2 x i64>, <2 x i64> *%a2, align 16
    119   %2 = call <2 x i64> @llvm.x86.aesni.aesdec(<2 x i64> %a0, <2 x i64> %a1)
    120   %3 = call <2 x i64> @llvm.x86.aesni.aesdec(<2 x i64> %2, <2 x i64> %1)
    121   ret <2 x i64> %3
    122 }
    123 declare <2 x i64> @llvm.x86.aesni.aesdec(<2 x i64>, <2 x i64>)
    124 
    125 define <2 x i64> @test_aesdeclast(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
    126 ; GENERIC-LABEL: test_aesdeclast:
    127 ; GENERIC:       # %bb.0:
    128 ; GENERIC-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [7:1.00]
    129 ; GENERIC-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [13:1.00]
    130 ; GENERIC-NEXT:    retq # sched: [1:1.00]
    131 ;
    132 ; SLM-LABEL: test_aesdeclast:
    133 ; SLM:       # %bb.0:
    134 ; SLM-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [8:5.00]
    135 ; SLM-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [8:5.00]
    136 ; SLM-NEXT:    retq # sched: [4:1.00]
    137 ;
    138 ; SANDY-SSE-LABEL: test_aesdeclast:
    139 ; SANDY-SSE:       # %bb.0:
    140 ; SANDY-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [7:1.00]
    141 ; SANDY-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [13:1.00]
    142 ; SANDY-SSE-NEXT:    retq # sched: [1:1.00]
    143 ;
    144 ; SANDY-LABEL: test_aesdeclast:
    145 ; SANDY:       # %bb.0:
    146 ; SANDY-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    147 ; SANDY-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
    148 ; SANDY-NEXT:    retq # sched: [1:1.00]
    149 ;
    150 ; HASWELL-SSE-LABEL: test_aesdeclast:
    151 ; HASWELL-SSE:       # %bb.0:
    152 ; HASWELL-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [7:1.00]
    153 ; HASWELL-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [13:1.00]
    154 ; HASWELL-SSE-NEXT:    retq # sched: [7:1.00]
    155 ;
    156 ; HASWELL-LABEL: test_aesdeclast:
    157 ; HASWELL:       # %bb.0:
    158 ; HASWELL-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    159 ; HASWELL-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
    160 ; HASWELL-NEXT:    retq # sched: [7:1.00]
    161 ;
    162 ; BROADWELL-SSE-LABEL: test_aesdeclast:
    163 ; BROADWELL-SSE:       # %bb.0:
    164 ; BROADWELL-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [7:1.00]
    165 ; BROADWELL-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [12:1.00]
    166 ; BROADWELL-SSE-NEXT:    retq # sched: [7:1.00]
    167 ;
    168 ; BROADWELL-LABEL: test_aesdeclast:
    169 ; BROADWELL:       # %bb.0:
    170 ; BROADWELL-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    171 ; BROADWELL-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [12:1.00]
    172 ; BROADWELL-NEXT:    retq # sched: [7:1.00]
    173 ;
    174 ; SKYLAKE-SSE-LABEL: test_aesdeclast:
    175 ; SKYLAKE-SSE:       # %bb.0:
    176 ; SKYLAKE-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [4:1.00]
    177 ; SKYLAKE-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [10:1.00]
    178 ; SKYLAKE-SSE-NEXT:    retq # sched: [7:1.00]
    179 ;
    180 ; SKYLAKE-LABEL: test_aesdeclast:
    181 ; SKYLAKE:       # %bb.0:
    182 ; SKYLAKE-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
    183 ; SKYLAKE-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
    184 ; SKYLAKE-NEXT:    retq # sched: [7:1.00]
    185 ;
    186 ; SKX-SSE-LABEL: test_aesdeclast:
    187 ; SKX-SSE:       # %bb.0:
    188 ; SKX-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [4:1.00]
    189 ; SKX-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [10:1.00]
    190 ; SKX-SSE-NEXT:    retq # sched: [7:1.00]
    191 ;
    192 ; SKX-LABEL: test_aesdeclast:
    193 ; SKX:       # %bb.0:
    194 ; SKX-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
    195 ; SKX-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
    196 ; SKX-NEXT:    retq # sched: [7:1.00]
    197 ;
    198 ; BTVER2-SSE-LABEL: test_aesdeclast:
    199 ; BTVER2-SSE:       # %bb.0:
    200 ; BTVER2-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [3:1.00]
    201 ; BTVER2-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [8:1.00]
    202 ; BTVER2-SSE-NEXT:    retq # sched: [4:1.00]
    203 ;
    204 ; BTVER2-LABEL: test_aesdeclast:
    205 ; BTVER2:       # %bb.0:
    206 ; BTVER2-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
    207 ; BTVER2-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [8:1.00]
    208 ; BTVER2-NEXT:    retq # sched: [4:1.00]
    209 ;
    210 ; ZNVER1-SSE-LABEL: test_aesdeclast:
    211 ; ZNVER1-SSE:       # %bb.0:
    212 ; ZNVER1-SSE-NEXT:    aesdeclast %xmm1, %xmm0 # sched: [4:0.50]
    213 ; ZNVER1-SSE-NEXT:    aesdeclast (%rdi), %xmm0 # sched: [11:0.50]
    214 ; ZNVER1-SSE-NEXT:    retq # sched: [1:0.50]
    215 ;
    216 ; ZNVER1-LABEL: test_aesdeclast:
    217 ; ZNVER1:       # %bb.0:
    218 ; ZNVER1-NEXT:    vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
    219 ; ZNVER1-NEXT:    vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [11:0.50]
    220 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
    221   %1 = load <2 x i64>, <2 x i64> *%a2, align 16
    222   %2 = call <2 x i64> @llvm.x86.aesni.aesdeclast(<2 x i64> %a0, <2 x i64> %a1)
    223   %3 = call <2 x i64> @llvm.x86.aesni.aesdeclast(<2 x i64> %2, <2 x i64> %1)
    224   ret <2 x i64> %3
    225 }
    226 declare <2 x i64> @llvm.x86.aesni.aesdeclast(<2 x i64>, <2 x i64>)
    227 
    228 define <2 x i64> @test_aesenc(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
    229 ; GENERIC-LABEL: test_aesenc:
    230 ; GENERIC:       # %bb.0:
    231 ; GENERIC-NEXT:    aesenc %xmm1, %xmm0 # sched: [7:1.00]
    232 ; GENERIC-NEXT:    aesenc (%rdi), %xmm0 # sched: [13:1.00]
    233 ; GENERIC-NEXT:    retq # sched: [1:1.00]
    234 ;
    235 ; SLM-LABEL: test_aesenc:
    236 ; SLM:       # %bb.0:
    237 ; SLM-NEXT:    aesenc %xmm1, %xmm0 # sched: [8:5.00]
    238 ; SLM-NEXT:    aesenc (%rdi), %xmm0 # sched: [8:5.00]
    239 ; SLM-NEXT:    retq # sched: [4:1.00]
    240 ;
    241 ; SANDY-SSE-LABEL: test_aesenc:
    242 ; SANDY-SSE:       # %bb.0:
    243 ; SANDY-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [7:1.00]
    244 ; SANDY-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [13:1.00]
    245 ; SANDY-SSE-NEXT:    retq # sched: [1:1.00]
    246 ;
    247 ; SANDY-LABEL: test_aesenc:
    248 ; SANDY:       # %bb.0:
    249 ; SANDY-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    250 ; SANDY-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
    251 ; SANDY-NEXT:    retq # sched: [1:1.00]
    252 ;
    253 ; HASWELL-SSE-LABEL: test_aesenc:
    254 ; HASWELL-SSE:       # %bb.0:
    255 ; HASWELL-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [7:1.00]
    256 ; HASWELL-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [13:1.00]
    257 ; HASWELL-SSE-NEXT:    retq # sched: [7:1.00]
    258 ;
    259 ; HASWELL-LABEL: test_aesenc:
    260 ; HASWELL:       # %bb.0:
    261 ; HASWELL-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    262 ; HASWELL-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
    263 ; HASWELL-NEXT:    retq # sched: [7:1.00]
    264 ;
    265 ; BROADWELL-SSE-LABEL: test_aesenc:
    266 ; BROADWELL-SSE:       # %bb.0:
    267 ; BROADWELL-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [7:1.00]
    268 ; BROADWELL-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [12:1.00]
    269 ; BROADWELL-SSE-NEXT:    retq # sched: [7:1.00]
    270 ;
    271 ; BROADWELL-LABEL: test_aesenc:
    272 ; BROADWELL:       # %bb.0:
    273 ; BROADWELL-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    274 ; BROADWELL-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [12:1.00]
    275 ; BROADWELL-NEXT:    retq # sched: [7:1.00]
    276 ;
    277 ; SKYLAKE-SSE-LABEL: test_aesenc:
    278 ; SKYLAKE-SSE:       # %bb.0:
    279 ; SKYLAKE-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [4:1.00]
    280 ; SKYLAKE-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [10:1.00]
    281 ; SKYLAKE-SSE-NEXT:    retq # sched: [7:1.00]
    282 ;
    283 ; SKYLAKE-LABEL: test_aesenc:
    284 ; SKYLAKE:       # %bb.0:
    285 ; SKYLAKE-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
    286 ; SKYLAKE-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
    287 ; SKYLAKE-NEXT:    retq # sched: [7:1.00]
    288 ;
    289 ; SKX-SSE-LABEL: test_aesenc:
    290 ; SKX-SSE:       # %bb.0:
    291 ; SKX-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [4:1.00]
    292 ; SKX-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [10:1.00]
    293 ; SKX-SSE-NEXT:    retq # sched: [7:1.00]
    294 ;
    295 ; SKX-LABEL: test_aesenc:
    296 ; SKX:       # %bb.0:
    297 ; SKX-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
    298 ; SKX-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
    299 ; SKX-NEXT:    retq # sched: [7:1.00]
    300 ;
    301 ; BTVER2-SSE-LABEL: test_aesenc:
    302 ; BTVER2-SSE:       # %bb.0:
    303 ; BTVER2-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [3:1.00]
    304 ; BTVER2-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [8:1.00]
    305 ; BTVER2-SSE-NEXT:    retq # sched: [4:1.00]
    306 ;
    307 ; BTVER2-LABEL: test_aesenc:
    308 ; BTVER2:       # %bb.0:
    309 ; BTVER2-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
    310 ; BTVER2-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [8:1.00]
    311 ; BTVER2-NEXT:    retq # sched: [4:1.00]
    312 ;
    313 ; ZNVER1-SSE-LABEL: test_aesenc:
    314 ; ZNVER1-SSE:       # %bb.0:
    315 ; ZNVER1-SSE-NEXT:    aesenc %xmm1, %xmm0 # sched: [4:0.50]
    316 ; ZNVER1-SSE-NEXT:    aesenc (%rdi), %xmm0 # sched: [11:0.50]
    317 ; ZNVER1-SSE-NEXT:    retq # sched: [1:0.50]
    318 ;
    319 ; ZNVER1-LABEL: test_aesenc:
    320 ; ZNVER1:       # %bb.0:
    321 ; ZNVER1-NEXT:    vaesenc %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
    322 ; ZNVER1-NEXT:    vaesenc (%rdi), %xmm0, %xmm0 # sched: [11:0.50]
    323 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
    324   %1 = load <2 x i64>, <2 x i64> *%a2, align 16
    325   %2 = call <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64> %a0, <2 x i64> %a1)
    326   %3 = call <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64> %2, <2 x i64> %1)
    327   ret <2 x i64> %3
    328 }
    329 declare <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64>, <2 x i64>)
    330 
    331 define <2 x i64> @test_aesenclast(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
    332 ; GENERIC-LABEL: test_aesenclast:
    333 ; GENERIC:       # %bb.0:
    334 ; GENERIC-NEXT:    aesenclast %xmm1, %xmm0 # sched: [7:1.00]
    335 ; GENERIC-NEXT:    aesenclast (%rdi), %xmm0 # sched: [13:1.00]
    336 ; GENERIC-NEXT:    retq # sched: [1:1.00]
    337 ;
    338 ; SLM-LABEL: test_aesenclast:
    339 ; SLM:       # %bb.0:
    340 ; SLM-NEXT:    aesenclast %xmm1, %xmm0 # sched: [8:5.00]
    341 ; SLM-NEXT:    aesenclast (%rdi), %xmm0 # sched: [8:5.00]
    342 ; SLM-NEXT:    retq # sched: [4:1.00]
    343 ;
    344 ; SANDY-SSE-LABEL: test_aesenclast:
    345 ; SANDY-SSE:       # %bb.0:
    346 ; SANDY-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [7:1.00]
    347 ; SANDY-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [13:1.00]
    348 ; SANDY-SSE-NEXT:    retq # sched: [1:1.00]
    349 ;
    350 ; SANDY-LABEL: test_aesenclast:
    351 ; SANDY:       # %bb.0:
    352 ; SANDY-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    353 ; SANDY-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
    354 ; SANDY-NEXT:    retq # sched: [1:1.00]
    355 ;
    356 ; HASWELL-SSE-LABEL: test_aesenclast:
    357 ; HASWELL-SSE:       # %bb.0:
    358 ; HASWELL-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [7:1.00]
    359 ; HASWELL-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [13:1.00]
    360 ; HASWELL-SSE-NEXT:    retq # sched: [7:1.00]
    361 ;
    362 ; HASWELL-LABEL: test_aesenclast:
    363 ; HASWELL:       # %bb.0:
    364 ; HASWELL-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    365 ; HASWELL-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [13:1.00]
    366 ; HASWELL-NEXT:    retq # sched: [7:1.00]
    367 ;
    368 ; BROADWELL-SSE-LABEL: test_aesenclast:
    369 ; BROADWELL-SSE:       # %bb.0:
    370 ; BROADWELL-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [7:1.00]
    371 ; BROADWELL-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [12:1.00]
    372 ; BROADWELL-SSE-NEXT:    retq # sched: [7:1.00]
    373 ;
    374 ; BROADWELL-LABEL: test_aesenclast:
    375 ; BROADWELL:       # %bb.0:
    376 ; BROADWELL-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
    377 ; BROADWELL-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [12:1.00]
    378 ; BROADWELL-NEXT:    retq # sched: [7:1.00]
    379 ;
    380 ; SKYLAKE-SSE-LABEL: test_aesenclast:
    381 ; SKYLAKE-SSE:       # %bb.0:
    382 ; SKYLAKE-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [4:1.00]
    383 ; SKYLAKE-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [10:1.00]
    384 ; SKYLAKE-SSE-NEXT:    retq # sched: [7:1.00]
    385 ;
    386 ; SKYLAKE-LABEL: test_aesenclast:
    387 ; SKYLAKE:       # %bb.0:
    388 ; SKYLAKE-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
    389 ; SKYLAKE-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
    390 ; SKYLAKE-NEXT:    retq # sched: [7:1.00]
    391 ;
    392 ; SKX-SSE-LABEL: test_aesenclast:
    393 ; SKX-SSE:       # %bb.0:
    394 ; SKX-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [4:1.00]
    395 ; SKX-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [10:1.00]
    396 ; SKX-SSE-NEXT:    retq # sched: [7:1.00]
    397 ;
    398 ; SKX-LABEL: test_aesenclast:
    399 ; SKX:       # %bb.0:
    400 ; SKX-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
    401 ; SKX-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [10:1.00]
    402 ; SKX-NEXT:    retq # sched: [7:1.00]
    403 ;
    404 ; BTVER2-SSE-LABEL: test_aesenclast:
    405 ; BTVER2-SSE:       # %bb.0:
    406 ; BTVER2-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [3:1.00]
    407 ; BTVER2-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [8:1.00]
    408 ; BTVER2-SSE-NEXT:    retq # sched: [4:1.00]
    409 ;
    410 ; BTVER2-LABEL: test_aesenclast:
    411 ; BTVER2:       # %bb.0:
    412 ; BTVER2-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
    413 ; BTVER2-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [8:1.00]
    414 ; BTVER2-NEXT:    retq # sched: [4:1.00]
    415 ;
    416 ; ZNVER1-SSE-LABEL: test_aesenclast:
    417 ; ZNVER1-SSE:       # %bb.0:
    418 ; ZNVER1-SSE-NEXT:    aesenclast %xmm1, %xmm0 # sched: [4:0.50]
    419 ; ZNVER1-SSE-NEXT:    aesenclast (%rdi), %xmm0 # sched: [11:0.50]
    420 ; ZNVER1-SSE-NEXT:    retq # sched: [1:0.50]
    421 ;
    422 ; ZNVER1-LABEL: test_aesenclast:
    423 ; ZNVER1:       # %bb.0:
    424 ; ZNVER1-NEXT:    vaesenclast %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
    425 ; ZNVER1-NEXT:    vaesenclast (%rdi), %xmm0, %xmm0 # sched: [11:0.50]
    426 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
    427   %1 = load <2 x i64>, <2 x i64> *%a2, align 16
    428   %2 = call <2 x i64> @llvm.x86.aesni.aesenclast(<2 x i64> %a0, <2 x i64> %a1)
    429   %3 = call <2 x i64> @llvm.x86.aesni.aesenclast(<2 x i64> %2, <2 x i64> %1)
    430   ret <2 x i64> %3
    431 }
    432 declare <2 x i64> @llvm.x86.aesni.aesenclast(<2 x i64>, <2 x i64>)
    433 
    434 define <2 x i64> @test_aesimc(<2 x i64> %a0, <2 x i64> *%a1) {
    435 ; GENERIC-LABEL: test_aesimc:
    436 ; GENERIC:       # %bb.0:
    437 ; GENERIC-NEXT:    aesimc %xmm0, %xmm1 # sched: [12:2.00]
    438 ; GENERIC-NEXT:    aesimc (%rdi), %xmm0 # sched: [18:2.00]
    439 ; GENERIC-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    440 ; GENERIC-NEXT:    retq # sched: [1:1.00]
    441 ;
    442 ; SLM-LABEL: test_aesimc:
    443 ; SLM:       # %bb.0:
    444 ; SLM-NEXT:    aesimc %xmm0, %xmm1 # sched: [8:5.00]
    445 ; SLM-NEXT:    aesimc (%rdi), %xmm0 # sched: [8:5.00]
    446 ; SLM-NEXT:    por %xmm1, %xmm0 # sched: [1:0.50]
    447 ; SLM-NEXT:    retq # sched: [4:1.00]
    448 ;
    449 ; SANDY-SSE-LABEL: test_aesimc:
    450 ; SANDY-SSE:       # %bb.0:
    451 ; SANDY-SSE-NEXT:    aesimc %xmm0, %xmm1 # sched: [12:2.00]
    452 ; SANDY-SSE-NEXT:    aesimc (%rdi), %xmm0 # sched: [18:2.00]
    453 ; SANDY-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    454 ; SANDY-SSE-NEXT:    retq # sched: [1:1.00]
    455 ;
    456 ; SANDY-LABEL: test_aesimc:
    457 ; SANDY:       # %bb.0:
    458 ; SANDY-NEXT:    vaesimc %xmm0, %xmm0 # sched: [12:2.00]
    459 ; SANDY-NEXT:    vaesimc (%rdi), %xmm1 # sched: [18:2.00]
    460 ; SANDY-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    461 ; SANDY-NEXT:    retq # sched: [1:1.00]
    462 ;
    463 ; HASWELL-SSE-LABEL: test_aesimc:
    464 ; HASWELL-SSE:       # %bb.0:
    465 ; HASWELL-SSE-NEXT:    aesimc %xmm0, %xmm1 # sched: [14:2.00]
    466 ; HASWELL-SSE-NEXT:    aesimc (%rdi), %xmm0 # sched: [20:2.00]
    467 ; HASWELL-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    468 ; HASWELL-SSE-NEXT:    retq # sched: [7:1.00]
    469 ;
    470 ; HASWELL-LABEL: test_aesimc:
    471 ; HASWELL:       # %bb.0:
    472 ; HASWELL-NEXT:    vaesimc %xmm0, %xmm0 # sched: [14:2.00]
    473 ; HASWELL-NEXT:    vaesimc (%rdi), %xmm1 # sched: [20:2.00]
    474 ; HASWELL-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    475 ; HASWELL-NEXT:    retq # sched: [7:1.00]
    476 ;
    477 ; BROADWELL-SSE-LABEL: test_aesimc:
    478 ; BROADWELL-SSE:       # %bb.0:
    479 ; BROADWELL-SSE-NEXT:    aesimc (%rdi), %xmm1 # sched: [19:2.00]
    480 ; BROADWELL-SSE-NEXT:    aesimc %xmm0, %xmm0 # sched: [14:2.00]
    481 ; BROADWELL-SSE-NEXT:    por %xmm0, %xmm1 # sched: [1:0.33]
    482 ; BROADWELL-SSE-NEXT:    movdqa %xmm1, %xmm0 # sched: [1:0.33]
    483 ; BROADWELL-SSE-NEXT:    retq # sched: [7:1.00]
    484 ;
    485 ; BROADWELL-LABEL: test_aesimc:
    486 ; BROADWELL:       # %bb.0:
    487 ; BROADWELL-NEXT:    vaesimc (%rdi), %xmm1 # sched: [19:2.00]
    488 ; BROADWELL-NEXT:    vaesimc %xmm0, %xmm0 # sched: [14:2.00]
    489 ; BROADWELL-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    490 ; BROADWELL-NEXT:    retq # sched: [7:1.00]
    491 ;
    492 ; SKYLAKE-SSE-LABEL: test_aesimc:
    493 ; SKYLAKE-SSE:       # %bb.0:
    494 ; SKYLAKE-SSE-NEXT:    aesimc %xmm0, %xmm1 # sched: [8:2.00]
    495 ; SKYLAKE-SSE-NEXT:    aesimc (%rdi), %xmm0 # sched: [14:2.00]
    496 ; SKYLAKE-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    497 ; SKYLAKE-SSE-NEXT:    retq # sched: [7:1.00]
    498 ;
    499 ; SKYLAKE-LABEL: test_aesimc:
    500 ; SKYLAKE:       # %bb.0:
    501 ; SKYLAKE-NEXT:    vaesimc %xmm0, %xmm0 # sched: [8:2.00]
    502 ; SKYLAKE-NEXT:    vaesimc (%rdi), %xmm1 # sched: [14:2.00]
    503 ; SKYLAKE-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    504 ; SKYLAKE-NEXT:    retq # sched: [7:1.00]
    505 ;
    506 ; SKX-SSE-LABEL: test_aesimc:
    507 ; SKX-SSE:       # %bb.0:
    508 ; SKX-SSE-NEXT:    aesimc %xmm0, %xmm1 # sched: [8:2.00]
    509 ; SKX-SSE-NEXT:    aesimc (%rdi), %xmm0 # sched: [14:2.00]
    510 ; SKX-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    511 ; SKX-SSE-NEXT:    retq # sched: [7:1.00]
    512 ;
    513 ; SKX-LABEL: test_aesimc:
    514 ; SKX:       # %bb.0:
    515 ; SKX-NEXT:    vaesimc %xmm0, %xmm0 # sched: [8:2.00]
    516 ; SKX-NEXT:    vaesimc (%rdi), %xmm1 # sched: [14:2.00]
    517 ; SKX-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    518 ; SKX-NEXT:    retq # sched: [7:1.00]
    519 ;
    520 ; BTVER2-SSE-LABEL: test_aesimc:
    521 ; BTVER2-SSE:       # %bb.0:
    522 ; BTVER2-SSE-NEXT:    aesimc %xmm0, %xmm1 # sched: [2:1.00]
    523 ; BTVER2-SSE-NEXT:    aesimc (%rdi), %xmm0 # sched: [7:1.00]
    524 ; BTVER2-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.50]
    525 ; BTVER2-SSE-NEXT:    retq # sched: [4:1.00]
    526 ;
    527 ; BTVER2-LABEL: test_aesimc:
    528 ; BTVER2:       # %bb.0:
    529 ; BTVER2-NEXT:    vaesimc (%rdi), %xmm1 # sched: [7:1.00]
    530 ; BTVER2-NEXT:    vaesimc %xmm0, %xmm0 # sched: [2:1.00]
    531 ; BTVER2-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.50]
    532 ; BTVER2-NEXT:    retq # sched: [4:1.00]
    533 ;
    534 ; ZNVER1-SSE-LABEL: test_aesimc:
    535 ; ZNVER1-SSE:       # %bb.0:
    536 ; ZNVER1-SSE-NEXT:    aesimc %xmm0, %xmm1 # sched: [4:0.50]
    537 ; ZNVER1-SSE-NEXT:    aesimc (%rdi), %xmm0 # sched: [11:0.50]
    538 ; ZNVER1-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.25]
    539 ; ZNVER1-SSE-NEXT:    retq # sched: [1:0.50]
    540 ;
    541 ; ZNVER1-LABEL: test_aesimc:
    542 ; ZNVER1:       # %bb.0:
    543 ; ZNVER1-NEXT:    vaesimc (%rdi), %xmm1 # sched: [11:0.50]
    544 ; ZNVER1-NEXT:    vaesimc %xmm0, %xmm0 # sched: [4:0.50]
    545 ; ZNVER1-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.25]
    546 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
    547   %1 = load <2 x i64>, <2 x i64> *%a1, align 16
    548   %2 = call <2 x i64> @llvm.x86.aesni.aesimc(<2 x i64> %a0)
    549   %3 = call <2 x i64> @llvm.x86.aesni.aesimc(<2 x i64> %1)
    550   %4 = or <2 x i64> %2, %3
    551   ret <2 x i64> %4
    552 }
    553 declare <2 x i64> @llvm.x86.aesni.aesimc(<2 x i64>)
    554 
    555 define <2 x i64> @test_aeskeygenassist(<2 x i64> %a0, <2 x i64> *%a1) {
    556 ; GENERIC-LABEL: test_aeskeygenassist:
    557 ; GENERIC:       # %bb.0:
    558 ; GENERIC-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [8:3.67]
    559 ; GENERIC-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [8:3.33]
    560 ; GENERIC-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    561 ; GENERIC-NEXT:    retq # sched: [1:1.00]
    562 ;
    563 ; SLM-LABEL: test_aeskeygenassist:
    564 ; SLM:       # %bb.0:
    565 ; SLM-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [8:5.00]
    566 ; SLM-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [8:5.00]
    567 ; SLM-NEXT:    por %xmm1, %xmm0 # sched: [1:0.50]
    568 ; SLM-NEXT:    retq # sched: [4:1.00]
    569 ;
    570 ; SANDY-SSE-LABEL: test_aeskeygenassist:
    571 ; SANDY-SSE:       # %bb.0:
    572 ; SANDY-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [8:3.67]
    573 ; SANDY-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [8:3.33]
    574 ; SANDY-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    575 ; SANDY-SSE-NEXT:    retq # sched: [1:1.00]
    576 ;
    577 ; SANDY-LABEL: test_aeskeygenassist:
    578 ; SANDY:       # %bb.0:
    579 ; SANDY-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [8:3.67]
    580 ; SANDY-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [8:3.33]
    581 ; SANDY-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    582 ; SANDY-NEXT:    retq # sched: [1:1.00]
    583 ;
    584 ; HASWELL-SSE-LABEL: test_aeskeygenassist:
    585 ; HASWELL-SSE:       # %bb.0:
    586 ; HASWELL-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [29:7.00]
    587 ; HASWELL-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [34:7.00]
    588 ; HASWELL-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    589 ; HASWELL-SSE-NEXT:    retq # sched: [7:1.00]
    590 ;
    591 ; HASWELL-LABEL: test_aeskeygenassist:
    592 ; HASWELL:       # %bb.0:
    593 ; HASWELL-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [29:7.00]
    594 ; HASWELL-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [34:7.00]
    595 ; HASWELL-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    596 ; HASWELL-NEXT:    retq # sched: [7:1.00]
    597 ;
    598 ; BROADWELL-SSE-LABEL: test_aeskeygenassist:
    599 ; BROADWELL-SSE:       # %bb.0:
    600 ; BROADWELL-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [29:7.00]
    601 ; BROADWELL-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [33:7.00]
    602 ; BROADWELL-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    603 ; BROADWELL-SSE-NEXT:    retq # sched: [7:1.00]
    604 ;
    605 ; BROADWELL-LABEL: test_aeskeygenassist:
    606 ; BROADWELL:       # %bb.0:
    607 ; BROADWELL-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [29:7.00]
    608 ; BROADWELL-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [33:7.00]
    609 ; BROADWELL-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    610 ; BROADWELL-NEXT:    retq # sched: [7:1.00]
    611 ;
    612 ; SKYLAKE-SSE-LABEL: test_aeskeygenassist:
    613 ; SKYLAKE-SSE:       # %bb.0:
    614 ; SKYLAKE-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [20:6.00]
    615 ; SKYLAKE-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [25:6.00]
    616 ; SKYLAKE-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    617 ; SKYLAKE-SSE-NEXT:    retq # sched: [7:1.00]
    618 ;
    619 ; SKYLAKE-LABEL: test_aeskeygenassist:
    620 ; SKYLAKE:       # %bb.0:
    621 ; SKYLAKE-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [20:6.00]
    622 ; SKYLAKE-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [25:6.00]
    623 ; SKYLAKE-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    624 ; SKYLAKE-NEXT:    retq # sched: [7:1.00]
    625 ;
    626 ; SKX-SSE-LABEL: test_aeskeygenassist:
    627 ; SKX-SSE:       # %bb.0:
    628 ; SKX-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [20:6.00]
    629 ; SKX-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [25:6.00]
    630 ; SKX-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.33]
    631 ; SKX-SSE-NEXT:    retq # sched: [7:1.00]
    632 ;
    633 ; SKX-LABEL: test_aeskeygenassist:
    634 ; SKX:       # %bb.0:
    635 ; SKX-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [20:6.00]
    636 ; SKX-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [25:6.00]
    637 ; SKX-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
    638 ; SKX-NEXT:    retq # sched: [7:1.00]
    639 ;
    640 ; BTVER2-SSE-LABEL: test_aeskeygenassist:
    641 ; BTVER2-SSE:       # %bb.0:
    642 ; BTVER2-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [2:1.00]
    643 ; BTVER2-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [7:1.00]
    644 ; BTVER2-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.50]
    645 ; BTVER2-SSE-NEXT:    retq # sched: [4:1.00]
    646 ;
    647 ; BTVER2-LABEL: test_aeskeygenassist:
    648 ; BTVER2:       # %bb.0:
    649 ; BTVER2-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [7:1.00]
    650 ; BTVER2-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [2:1.00]
    651 ; BTVER2-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.50]
    652 ; BTVER2-NEXT:    retq # sched: [4:1.00]
    653 ;
    654 ; ZNVER1-SSE-LABEL: test_aeskeygenassist:
    655 ; ZNVER1-SSE:       # %bb.0:
    656 ; ZNVER1-SSE-NEXT:    aeskeygenassist $7, %xmm0, %xmm1 # sched: [4:0.50]
    657 ; ZNVER1-SSE-NEXT:    aeskeygenassist $7, (%rdi), %xmm0 # sched: [11:0.50]
    658 ; ZNVER1-SSE-NEXT:    por %xmm1, %xmm0 # sched: [1:0.25]
    659 ; ZNVER1-SSE-NEXT:    retq # sched: [1:0.50]
    660 ;
    661 ; ZNVER1-LABEL: test_aeskeygenassist:
    662 ; ZNVER1:       # %bb.0:
    663 ; ZNVER1-NEXT:    vaeskeygenassist $7, (%rdi), %xmm1 # sched: [11:0.50]
    664 ; ZNVER1-NEXT:    vaeskeygenassist $7, %xmm0, %xmm0 # sched: [4:0.50]
    665 ; ZNVER1-NEXT:    vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.25]
    666 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
    667   %1 = load <2 x i64>, <2 x i64> *%a1, align 16
    668   %2 = call <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64> %a0, i8 7)
    669   %3 = call <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64> %1, i8 7)
    670   %4 = or <2 x i64> %2, %3
    671   ret <2 x i64> %4
    672 }
    673 declare <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64>, i8)
    674