1 # Using a trick to run register-coalescer twice, that way
2 # liveintervals should be preserved while running the machine verifier.
4 # RUN: not --crash llc -o - %s -march=hexagon -hexagon-subreg-liveness=false -run-pass register-coalescer -verify-machineinstrs -run-pass register-coalescer 2>&1 | FileCheck -check-prefix=CHECK-NOSUB %s
5 # RUN: not --crash llc -o - %s -march=hexagon -hexagon-subreg-liveness=true -run-pass register-coalescer -verify-machineinstrs -run-pass register-coalescer 2>&1 | FileCheck -check-prefix=CHECK-SUB %s
9 tracksRegLiveness: true
12 A2_nop implicit-def %0:doubleregs
13 A2_nop implicit-def dead %0.isub_lo, implicit-def %0.isub_hi, implicit %0
14 A2_nop implicit %0.isub_hi
19 tracksRegLiveness: true
22 A2_nop implicit-def %0:doubleregs
23 A2_nop implicit-def dead %0.isub_lo, implicit-def %0.isub_hi, implicit %0
24 A2_nop implicit %0.isub_lo
26 A2_nop implicit-def %1:doubleregs
27 A2_nop implicit-def dead %1.isub_lo, implicit-def dead %1.isub_hi, implicit %1
30 A2_nop implicit-def dead %2:doubleregs
35 ###############################################################################
36 # We are expecting four "Bad machine code" when subregister liveness is used.
38 # CHECK-SUB-NOT: Bad machine code
40 # CHECK-SUB: Bad machine code: Live range continues after dead def flag
41 # CHECK_SUB-NEXT: function: test_fail
42 # CHECK-SUB: v. register: %0
43 # CHECK-SUB: lanemask: 0000000000000002
45 # CHECK-SUB-NOT: Bad machine code
47 # CHECK-SUB: Bad machine code: Live range continues after dead def flag
48 # CHECK-SUB-NEXT: function: test_fail
49 # CHECK-SUB: v. register: %1
50 # CHECK-SUB: lanemask: 0000000000000002
52 # CHECK-SUB-NOT: Bad machine code
54 # CHECK-SUB: Bad machine code: Live range continues after dead def flag
55 # CHECK-SUB-NEXT: function: test_fail
56 # CHECK-SUB: v. register: %1
57 # CHECK-SUB: lanemask: 0000000000000001
59 # CHECK-SUB: Bad machine code: Live range continues after dead def flag
60 # CHECK-SUB-NEXT: function: test_fail
61 # CHECK: v. register: %2
63 # CHECK-SUB-NOT: Bad machine code
65 ###############################################################################
66 # Without subregister liveness we only detect one of the failing scenarios.
68 # CHECK-NOSUB-NOT: Bad machine code
70 # CHECK-NOSUB: Bad machine code: Live range continues after dead def flag
71 # CHECK-NOSUB-NEXT: function: test_fail
72 # CHECK: v. register: %2
74 # CHECK-NOSUB-NOT: Bad machine code