1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=s390x-linux-gnu -sink-insts-to-avoid-spills -verify-machineinstrs -run-pass=machine-sink -o - %s | FileCheck %s
4 # Test kill flags are cleared after sinking operations into cycle during MachineLICM.
7 target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
8 target triple = "s390x-unknown-linux-gnu"
10 %0 = type <{ i32, [3 x i8] }>
12 @b = external dso_local global [1 x %0], align 2
14 define dso_local void @c() local_unnamed_addr {
21 tracksRegLiveness: true
23 ; CHECK-LABEL: name: c
25 ; CHECK-NEXT: successors: %bb.1(0x80000000)
27 ; CHECK-NEXT: [[LARL:%[0-9]+]]:addr64bit = LARL @b
30 ; CHECK-NEXT: successors: %bb.1(0x80000000)
32 ; CHECK-NEXT: [[LA:%[0-9]+]]:gr64bit = LA [[LARL]], 49, $noreg
33 ; CHECK-NEXT: [[LGHI:%[0-9]+]]:gr64bit = LGHI 7
34 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gr64bit = IMPLICIT_DEF
35 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:gr64bit = IMPLICIT_DEF
36 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0
37 ; CHECK-NEXT: $r2d = COPY [[DEF]]
38 ; CHECK-NEXT: $r3d = COPY [[LA]]
39 ; CHECK-NEXT: $r4d = COPY [[LGHI]]
40 ; CHECK-NEXT: CallBRASL &memcpy, $r2d, $r3d, $r4d, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc, implicit-def $r2d
41 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0
42 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0
43 ; CHECK-NEXT: $r2d = COPY [[DEF1]]
44 ; CHECK-NEXT: $r3d = COPY [[LA]]
45 ; CHECK-NEXT: $r4d = COPY [[LGHI]]
46 ; CHECK-NEXT: CallBRASL &memcpy, $r2d, $r3d, $r4d, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc, implicit-def $r2d
47 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0
50 successors: %bb.1(0x80000000)
52 %1:addr64bit = LARL @b
53 %0:gr64bit = LA killed %1, 49, $noreg
55 %3:gr64bit = IMPLICIT_DEF
56 %5:gr64bit = IMPLICIT_DEF
59 successors: %bb.1(0x80000000)
65 CallBRASL &memcpy, $r2d, $r3d, $r4d, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc, implicit-def $r2d
71 CallBRASL &memcpy, $r2d, $r3d, $r4d, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc, implicit-def $r2d