1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=amdgcn -mcpu=fiji -verify-machineinstrs -run-pass=si-optimize-exec-masking -o - %s | FileCheck %s
3
4# There are multiple _term pseudos here. Starting from the end of the
5# block, they all need to be converted to regular copies removed in
6# order to avoid making the verifier unhappy.
7
8---
9name:  multi_term_pseudos
10tracksRegLiveness: true
11body:             |
12  ; CHECK-LABEL: name: multi_term_pseudos
13  ; CHECK: bb.0:
14  ; CHECK:   successors: %bb.2(0x40000000), %bb.1(0x40000000)
15  ; CHECK:   liveins: $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9
16  ; CHECK:   $exec = COPY killed renamable $sgpr4_sgpr5
17  ; CHECK:   renamable $sgpr10_sgpr11 = COPY killed renamable $sgpr6_sgpr7, implicit $exec
18  ; CHECK:   renamable $sgpr12_sgpr13 = COPY killed renamable $sgpr8_sgpr9, implicit $exec
19  ; CHECK:   S_CBRANCH_EXECZ %bb.1, implicit $exec
20  ; CHECK:   S_BRANCH %bb.2
21  ; CHECK: bb.1:
22  ; CHECK:   liveins: $sgpr12_sgpr13
23  ; CHECK:   S_ENDPGM 0, implicit $sgpr12_sgpr13
24  ; CHECK: bb.2:
25  ; CHECK:   liveins: $sgpr12_sgpr13
26  ; CHECK:   S_ENDPGM 0, implicit $sgpr12_sgpr13
27  bb.0:
28    successors: %bb.2(0x40000000), %bb.1(0x40000000)
29    liveins: $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9
30    $exec = S_MOV_B64_term killed renamable $sgpr4_sgpr5
31    renamable $sgpr10_sgpr11 = S_MOV_B64_term killed renamable $sgpr6_sgpr7, implicit $exec
32    renamable $sgpr12_sgpr13 = S_MOV_B64_term killed renamable $sgpr8_sgpr9, implicit $exec
33    S_CBRANCH_EXECZ %bb.1, implicit $exec
34    S_BRANCH %bb.2
35
36  bb.1:
37    liveins: $sgpr12_sgpr13
38    S_ENDPGM 0, implicit $sgpr12_sgpr13
39
40  bb.2:
41    liveins: $sgpr12_sgpr13
42    S_ENDPGM 0, implicit $sgpr12_sgpr13
43
44...
45