[ARM] Fixup the creation of VPT blocks
[llvm-core.git] / test / CodeGen / AMDGPU / regcoalesce-keep-valid-lanes-implicit-def-bug39602.mir
blobdc66e6641ebc6e372e976f4bf27d4885c02cf7ac
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-coalescing -run-pass=simple-register-coalescing -verify-machineinstrs -o - %s | FileCheck %s
4 # Bug 39602: Avoid "Couldn't join subrange" error when clearing valid
5 # lanes on an implicit_def that later cannot be erased.
7 ---
8 name: lost_valid_lanes_maybe_erasable_implicit_def
9 tracksRegLiveness: true
10 body:             |
11   ; CHECK-LABEL: name: lost_valid_lanes_maybe_erasable_implicit_def
12   ; CHECK: bb.0:
13   ; CHECK:   successors: %bb.1(0x80000000)
14   ; CHECK:   undef %0.sub1:sreg_64 = IMPLICIT_DEF
15   ; CHECK: bb.1:
16   ; CHECK:   %0.sub0:sreg_64 = S_MOV_B32 0
17   ; CHECK:   [[COPY:%[0-9]+]]:sreg_64 = COPY %0
18   ; CHECK:   dead %0.sub1:sreg_64 = COPY %0.sub0
19   ; CHECK:   S_ENDPGM 0, implicit [[COPY]].sub1
20   bb.0:
21     successors: %bb.1
22     undef %0.sub1:sreg_64 = IMPLICIT_DEF
24   bb.1:
25     %0.sub0:sreg_64 = S_MOV_B32 0
26     %1:sreg_64 = COPY %0:sreg_64
27     dead %0.sub1:sreg_64 = COPY %0.sub0:sreg_64
28     S_ENDPGM 0, implicit %1.sub1:sreg_64
30 ...
31 ---
32 # Same as previous, except with a real value instead of
33 # IMPLICIT_DEF. These should both be handled the same way.
35 name:  lost_valid_lanes_real_value
36 tracksRegLiveness: true
37 body:             |
38   ; CHECK-LABEL: name: lost_valid_lanes_real_value
39   ; CHECK: bb.0:
40   ; CHECK:   successors: %bb.1(0x80000000)
41   ; CHECK:   undef %0.sub1:sreg_64 = S_MOV_B32 -1
42   ; CHECK: bb.1:
43   ; CHECK:   %0.sub0:sreg_64 = S_MOV_B32 0
44   ; CHECK:   [[COPY:%[0-9]+]]:sreg_64 = COPY %0
45   ; CHECK:   dead %0.sub1:sreg_64 = COPY %0.sub0
46   ; CHECK:   S_ENDPGM 0, implicit [[COPY]].sub1
47   bb.0:
48     successors: %bb.1
49     undef %0.sub1:sreg_64 = S_MOV_B32 -1
51   bb.1:
52     %0.sub0:sreg_64 = S_MOV_B32 0
53     %1:sreg_64 = COPY %0:sreg_64
54     dead %0.sub1:sreg_64 = COPY %0.sub0:sreg_64
55     S_ENDPGM 0, implicit %1.sub1:sreg_64
57 ...