# RUN: llc -march=hexagon -run-pass hexagon-move-phicopy -o - %s | FileCheck %s
# CHECK-COUNT-1: %4:intregs = COPY %1
# CHECK: bb.1
# CHECK-NOT: %4:intregs = COPY %1
# CHECK: bb.2
# CHECK-NOT: %4:intregs = COPY %1
# CHECK: %5:intregs = COPY %0
---
name: f0
tracksRegLiveness: false
registers:
- { id: 0, class: intregs, preferred-register: '' }
- { id: 1, class: intregs, preferred-register: '' }
- { id: 2, class: predregs, preferred-register: '' }
- { id: 3, class: predregs, preferred-register: '' }
- { id: 4, class: intregs, preferred-register: '' }
- { id: 5, class: intregs, preferred-register: '' }
stack:
- { id: 0, offset: 0, size: 4, alignment: 8 }
body: |
bb.0:
successors: %bb.1, %bb.2
%1:intregs = COPY $r1
%0:intregs = COPY $r0
%2:predregs = C2_cmpgt %0, %1
%3:predregs = C2_not %2
J2_jumpt %3, %bb.2, implicit-def dead $pc
J2_jump %bb.1, implicit-def dead $pc
bb.1:
successors: %bb.0
%4:intregs = COPY %1
$r1 = COPY %4
J2_jump %bb.0, implicit-def dead $pc
bb.2:
successors: %bb.0
%4:intregs = COPY %1
%5:intregs = COPY %0
$r1 = COPY %4
J2_jump %bb.0, implicit-def dead $pc
...