xref: /llvm-project/llvm/test/CodeGen/Hexagon/early-if-debug.mir (revision 2208c97c1bec2512d4e47b6223db6d95a7037956)
1# RUN: llc -mtriple=hexagon -eif-limit=4 -run-pass hexagon-early-if -o - %s | FileCheck %s
2# Check that even with the limit of 4 instructions, the block bb.1 is
3# if-converted.
4
5# CHECK-LABEL: bb.0:
6# CHECK: %0:intregs = COPY $r0
7# CHECK: %1:predregs = C2_cmpeqi %0, 0
8# CHECK: %2:intregs = A2_tfrsi 123
9# CHECK: DBG_VALUE %0, $noreg
10# CHECK: DBG_VALUE %0, $noreg
11# CHECK: DBG_VALUE %0, $noreg
12# CHECK: DBG_VALUE %0, $noreg
13# CHECK: DBG_VALUE %0, $noreg
14# CHECK: %3:intregs = A2_tfrsi 321
15# CHECK: %5:intregs = C2_mux %1, %2, %3
16
17--- |
18  define void @foo() {
19    ret void
20  }
21...
22---
23name: foo
24tracksRegLiveness: true
25registers:
26  - { id: 0, class: intregs }
27  - { id: 1, class: predregs }
28  - { id: 2, class: intregs }
29  - { id: 3, class: intregs }
30  - { id: 4, class: intregs }
31body:             |
32  bb.0:
33    liveins: $r0
34
35    %0 = COPY $r0
36    %1 = C2_cmpeqi %0, 0
37    %2 = A2_tfrsi 123
38    J2_jumpt %1, %bb.2, implicit-def dead $pc
39    J2_jump %bb.1, implicit-def dead $pc
40
41  bb.1:
42    DBG_VALUE %0, $noreg
43    DBG_VALUE %0, $noreg
44    DBG_VALUE %0, $noreg
45    DBG_VALUE %0, $noreg
46    DBG_VALUE %0, $noreg
47    %3 = A2_tfrsi 321
48
49  bb.2:
50    %4 = PHI %2, %bb.0, %3, %bb.1
51
52...
53