58 lines · plain
1# RUN: llc -march hexagon -run-pass livevars -run-pass twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s2# RUN: llc -march hexagon --passes='require<live-vars>,two-address-instruction' -verify-each -o - %s | FileCheck %s3 4 5###############################################################################6 7---8name: test19tracksRegLiveness: true10body: |11 bb.0.entry:12 liveins: $d013 14 %0:doubleregs = COPY killed $d015 %1:intregs = S2_lsr_i_r_acc %0.isub_lo, %0.isub_lo, 1616 17...18 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)21#22# CHECK-LABEL: name: test123# CHECK: bb.0.entry:24# CHECK: %0:doubleregs = COPY killed $d025# CHECK-NEXT: %1:intregs = COPY killed %0.isub_lo26# CHECK-NEXT: %1:intregs = S2_lsr_i_r_acc %1, %1, 1627 28 29###############################################################################30 31---32name: test233tracksRegLiveness: true34body: |35 bb.0.entry:36 liveins: $d037 38 %0:doubleregs = COPY killed $d039 %1:intregs = S2_lsr_i_r_acc %0.isub_lo, %0.isub_hi, 1640 41...42 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)45#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 last49# use of %0.isub_hi, but we do not need it for the IR to be valid.50#51# CHECK-LABEL: name: test252# CHECK: bb.0.entry:53# CHECK: %0:doubleregs = COPY killed $d054# CHECK-NEXT: %1:intregs = COPY %0.isub_lo55# CHECK-NEXT: %1:intregs = S2_lsr_i_r_acc %1, %0.isub_hi, 1656 57###############################################################################58