1 # RUN: llc -march=hexagon -run-pass expand-condsets -o - %s -verify-machineinstrs | FileCheck %s
3 # CHECK-LABEL: name: fred
5 # Make sure that <def,read-undef> is accounted for when validating moves
6 # during predication. In the code below, %2.isub_hi is invalidated
7 # by the C2_mux instruction, and so predicating the A2_addi as an argument
8 # to the C2_muxir should not happen.
11 define void @fred() { ret void }
17 tracksRegLiveness: true
19 - { id: 0, class: predregs }
20 - { id: 1, class: intregs }
21 - { id: 2, class: doubleregs }
22 - { id: 3, class: intregs }
24 - { reg: '$p0', virtual-reg: '%0' }
25 - { reg: '$r0', virtual-reg: '%1' }
26 - { reg: '$d0', virtual-reg: '%2' }
30 liveins: $r0, $d0, $p0
34 ; This copy is added by distributing disjoint live interval. Check
35 ; for it to make sure %4 is the right thing.
36 ; CHECK: %4:doubleregs = COPY $d0
37 ; Check that this instruction is unchanged (remains unpredicated)
38 ; CHECK: %3:intregs = A2_addi %4.isub_hi, 1
39 %3 = A2_addi %2.isub_hi, 1
40 undef %2.isub_lo = C2_mux %0, %2.isub_lo, %1
41 %2.isub_hi = C2_muxir %0, %3, 0