1 # RUN: llc -march hexagon -run-pass livevars -run-pass twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s
2 # RUN: llc -march hexagon --passes='require<live-vars>,two-address-instruction' -verify-each -o - %s | FileCheck %s
5 ###############################################################################
9 tracksRegLiveness: true
14 %0:doubleregs = COPY killed $d0
15 %1:intregs = S2_lsr_i_r_acc %0.isub_lo, %0.isub_lo, 16
19 # Verify that both uses if %0.isub_lo are replaced here.
20 # (we used to get %1:intregs = S2_lsr_i_r_acc %1, %1.isub_lo, 16)
22 # CHECK-LABEL: name: test1
24 # CHECK: %0:doubleregs = COPY killed $d0
25 # CHECK-NEXT: %1:intregs = COPY killed %0.isub_lo
26 # CHECK-NEXT: %1:intregs = S2_lsr_i_r_acc %1, %1, 16
29 ###############################################################################
33 tracksRegLiveness: true
38 %0:doubleregs = COPY killed $d0
39 %1:intregs = S2_lsr_i_r_acc %0.isub_lo, %0.isub_hi, 16
43 # Verify that the use of %0.isub_hi isn't replaced here.
44 # (we used to get %1:intregs = S2_lsr_i_r_acc %1, %1.isub_hi, 16)
46 # We also used to get an incorrect "killed" for %0 in the second COPY.
47 # So we verify that we do not get machine verifier complaints here.
48 # An improvement could be to get a "killed" attribute on the last
49 # use of %0.isub_hi, but we do not need it for the IR to be valid.
51 # CHECK-LABEL: name: test2
53 # CHECK: %0:doubleregs = COPY killed $d0
54 # CHECK-NEXT: %1:intregs = COPY %0.isub_lo
55 # CHECK-NEXT: %1:intregs = S2_lsr_i_r_acc %1, %0.isub_hi, 16
57 ###############################################################################