75 lines · plain
1# Using a trick to run register-coalescer twice, that way2# liveintervals should be preserved while running the machine verifier.3#4# RUN: not --crash llc -o - %s -mtriple=hexagon -enable-subreg-liveness=false -run-pass register-coalescer -verify-machineinstrs -run-pass register-coalescer 2>&1 | FileCheck -check-prefix=CHECK-NOSUB %s5# RUN: not --crash llc -o - %s -mtriple=hexagon -enable-subreg-liveness=true -run-pass register-coalescer -verify-machineinstrs -run-pass register-coalescer 2>&1 | FileCheck -check-prefix=CHECK-SUB %s6 7---8name: test_pass9tracksRegLiveness: true10body: |11 bb.0:12 A2_nop implicit-def %0:doubleregs13 A2_nop implicit-def dead %0.isub_lo, implicit-def %0.isub_hi, implicit %014 A2_nop implicit %0.isub_hi15...16 17---18name: test_fail19tracksRegLiveness: true20body: |21 bb.0:22 A2_nop implicit-def %0:doubleregs23 A2_nop implicit-def dead %0.isub_lo, implicit-def %0.isub_hi, implicit %024 A2_nop implicit %0.isub_lo25 26 A2_nop implicit-def %1:doubleregs27 A2_nop implicit-def dead %1.isub_lo, implicit-def dead %1.isub_hi, implicit %128 A2_nop implicit %129 30 A2_nop implicit-def dead %2:doubleregs31 A2_nop implicit %232 33...34 35###############################################################################36# We are expecting four "Bad machine code" when subregister liveness is used.37#38# CHECK-SUB-NOT: Bad machine code39#40# CHECK-SUB: Bad machine code: Live range continues after dead def flag41# CHECK_SUB-NEXT: function: test_fail42# CHECK-SUB: v. register: %043# CHECK-SUB: lanemask: 000000000000000244#45# CHECK-SUB-NOT: Bad machine code46#47# CHECK-SUB: Bad machine code: Live range continues after dead def flag48# CHECK-SUB-NEXT: function: test_fail49# CHECK-SUB: v. register: %150# CHECK-SUB: lanemask: 000000000000000251#52# CHECK-SUB-NOT: Bad machine code53#54# CHECK-SUB: Bad machine code: Live range continues after dead def flag55# CHECK-SUB-NEXT: function: test_fail56# CHECK-SUB: v. register: %157# CHECK-SUB: lanemask: 000000000000000158#59# CHECK-SUB: Bad machine code: Live range continues after dead def flag60# CHECK-SUB-NEXT: function: test_fail61# CHECK: v. register: %262#63# CHECK-SUB-NOT: Bad machine code64 65###############################################################################66# Without subregister liveness we only detect one of the failing scenarios.67#68# CHECK-NOSUB-NOT: Bad machine code69#70# CHECK-NOSUB: Bad machine code: Live range continues after dead def flag71# CHECK-NOSUB-NEXT: function: test_fail72# CHECK: v. register: %273#74# CHECK-NOSUB-NOT: Bad machine code75