66 lines · plain
1# Check that the backend properly tracks debug-instr-references across the2# elim-compare pass.3#4# RUN: llc %s -mtriple=s390x-linux-gnu -mcpu=z14 -run-pass=systemz-elim-compare \5# RUN: -o - 2>&1 | FileCheck %s6 7# bb.0 - elimination of CHI, modification of BRC, no substitutions8# bb.1 - elimination of CHI, replacement of LR with LTR, one substitution9# bb.2 - elimination of L and CHI, modification of CondTrap into LAT, one substitution10# CHECK: name: foo11# CHECK: debugValueSubstitutions:12# these are the correct substitutions13# CHECK-NEXT: - { srcinst: 5, srcop: 0, dstinst: 13, dstop: 0, subreg: 0 }14# CHECK-NEXT: - { srcinst: 7, srcop: 0, dstinst: 9, dstop: 0, subreg: 0 }15# CHECK-NEXT: - { srcinst: 10, srcop: 0, dstinst: 14, dstop: 0, subreg: 0 }16# we also need to make sure that these are the only substitutions17# CHECK-NEXT: constants: []18---19name: foo20tracksRegLiveness: true21liveins:22 - { reg: '$r2l', virtual-reg: '' }23 - { reg: '$r3l', virtual-reg: '' }24 - { reg: '$r4l', virtual-reg: '' }25 - { reg: '$r5d', virtual-reg: '' }26debugValueSubstitutions: []27body: |28 bb.0:29 successors: %bb.1(0x80000000)30 liveins: $r2l, $r3l, $r4l, $r5d31 32 renamable $r3l = nsw AR killed renamable $r3l, renamable $r2l, implicit-def dead $cc, debug-instr-number 133 CHI renamable $r3l, 0, implicit-def $cc, debug-instr-number 234 BRC 14, 12, %bb.1, implicit $cc, debug-instr-number 335 36 bb.1:37 successors: %bb.2(0x80000000)38 liveins: $r2l, $r3l, $r4l, $r5d39 40 CHI renamable $r2l, 0, implicit-def $cc, debug-instr-number 441 renamable $r3l = LR renamable $r2l, debug-instr-number 542 BRC 14, 8, %bb.2, implicit killed $cc, debug-instr-number 643 44 bb.2:45 successors: %bb.3(0x80000000)46 liveins: $r2l, $r3l, $r4l, $r5d47 48 renamable $r2l = L killed renamable $r5d, 0, $noreg, debug-instr-number 749 CHI renamable $r2l, 0, implicit-def $cc, debug-instr-number 850 CondTrap 14, 8, implicit killed $cc, debug-instr-number 951 J %bb.352 53 bb.3:54 successors: %bb.4(080000000)55 liveins: $r2l, $r3l, $r4l, $r5d56 57 renamable $r3l = L renamable $r5d, 0, $noreg, debug-instr-number 1058 CHI renamable $r3l, 0, implicit-def $cc, debug-instr-number 1159 BRC 14, 8, %bb.4, implicit killed $cc, debug-instr-number 1260 61 bb.4:62 $r2l = LHI 263 Return implicit $r2l64 65...66