1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc %s -mtriple=x86_64-unknown-linux-gnu -mcpu=skx -run-pass=machine-cp -o - | FileCheck %s
4 # machine-cp previously asserted trying to determine if the k0->eax copy below
5 # could be combined with the k0->rax copy.
9 source_filename = "test.ll"
10 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
12 define i8 @foo(<64 x i8> %x, ptr %y, i64 %z) #0 {
13 %a = icmp eq <64 x i8> %x, zeroinitializer
14 %b = bitcast <64 x i1> %a to i64
16 store i64 %c, ptr %y, align 8
17 %d = extractelement <64 x i1> %a, i32 0
22 attributes #0 = { "target-cpu"="skx" }
28 tracksRegLiveness: true
35 machineFunctionInfo: {}
38 liveins: $rdi, $rsi, $zmm0
40 ; CHECK-LABEL: name: foo
41 ; CHECK: liveins: $rdi, $rsi, $zmm0
42 ; CHECK: renamable $k0 = VPTESTNMBZrr killed renamable $zmm0, renamable $zmm0
43 ; CHECK: renamable $rax = COPY renamable $k0
44 ; CHECK: renamable $rsi = ADD64rr killed renamable $rsi, killed renamable $rax, implicit-def dead $eflags
45 ; CHECK: MOV64mr killed renamable $rdi, 1, $noreg, 0, $noreg, killed renamable $rsi :: (store (s64) into %ir.y)
46 ; CHECK: renamable $eax = COPY killed renamable $k0
47 ; CHECK: renamable $al = AND8ri renamable $al, 1, implicit-def dead $eflags, implicit killed $eax, implicit-def $eax
48 ; CHECK: $al = KILL renamable $al, implicit killed $eax
50 renamable $k0 = VPTESTNMBZrr killed renamable $zmm0, renamable $zmm0
51 renamable $rax = COPY renamable $k0
52 renamable $rsi = ADD64rr killed renamable $rsi, killed renamable $rax, implicit-def dead $eflags
53 MOV64mr killed renamable $rdi, 1, $noreg, 0, $noreg, killed renamable $rsi :: (store (s64) into %ir.y)
54 renamable $eax = COPY killed renamable $k0
55 renamable $al = AND8ri renamable $al, 1, implicit-def dead $eflags, implicit killed $eax, implicit-def $eax
56 $al = KILL renamable $al, implicit killed $eax