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 3 4# machine-cp previously asserted trying to determine if the k0->eax copy below 5# could be combined with the k0->rax copy. 6 7--- | 8 ; ModuleID = 'test.ll' 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" 11 12 define i8 @foo(<64 x i8> %x, i64* %y, i64 %z) #0 { 13 %a = icmp eq <64 x i8> %x, zeroinitializer 14 %b = bitcast <64 x i1> %a to i64 15 %c = add i64 %b, %z 16 store i64 %c, i64* %y, align 8 17 %d = extractelement <64 x i1> %a, i32 0 18 %e = zext i1 %d to i8 19 ret i8 %e 20 } 21 22 attributes #0 = { "target-cpu"="skx" } 23 24... 25--- 26name: foo 27alignment: 16 28tracksRegLiveness: true 29liveins: 30 - { reg: '$zmm0' } 31 - { reg: '$rdi' } 32 - { reg: '$rsi' } 33frameInfo: 34 maxAlignment: 1 35machineFunctionInfo: {} 36body: | 37 bb.0 (%ir-block.0): 38 liveins: $rdi, $rsi, $zmm0 39 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 8 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 49 ; CHECK: RET 0, $al 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 8 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 57 RET 0, $al 58 59... 60