120
|
1 # RUN: llc -march=hexagon -run-pass if-converter %s -o - | FileCheck %s
|
|
2
|
|
3 # Make sure that the necessary implicit uses are added to predicated
|
|
4 # instructions.
|
|
5
|
|
6 # CHECK-LABEL: name: foo
|
|
7
|
|
8 --- |
|
|
9 define void @foo() {
|
|
10 ret void
|
|
11 }
|
|
12 ...
|
|
13
|
|
14 ---
|
|
15 name: foo
|
|
16 tracksRegLiveness: true
|
|
17 body: |
|
|
18 bb.0:
|
|
19 successors: %bb.1, %bb.2
|
|
20 liveins: %r0, %r2, %p1
|
|
21 J2_jumpf %p1, %bb.1, implicit-def %pc
|
|
22 J2_jump %bb.2, implicit-def %pc
|
|
23 bb.1:
|
|
24 successors: %bb.3
|
|
25 liveins: %r2
|
|
26 %r0 = A2_tfrsi 2
|
|
27 J2_jump %bb.3, implicit-def %pc
|
|
28 bb.2:
|
|
29 successors: %bb.3
|
|
30 liveins: %r0
|
|
31 ; Even though r2 was not live on entry to this block, it was live across
|
|
32 ; block bb.1 in the original diamond. After if-conversion, the diamond
|
|
33 ; became a single block, and so r2 is now live on entry to the instructions
|
|
34 ; originating from bb.2.
|
121
|
35 ; CHECK: %r2 = C2_cmoveit %p1, 1, implicit killed %r2
|
120
|
36 %r2 = A2_tfrsi 1
|
|
37 bb.3:
|
|
38 liveins: %r0, %r2
|
|
39 %r0 = A2_add %r0, %r2
|
|
40 J2_jumpr %r31, implicit-def %pc
|
|
41 ...
|
|
42
|