reduce-saveexec.mir
3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-optimize-exec-masking %s -o - | FileCheck -check-prefix=GCN %s
---
# GCN-LABEL: name: reduce_and_saveexec
# GCN: $exec = S_AND_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_and_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_and_saveexec_commuted
# GCN: $exec = S_AND_B64 killed $vcc, $exec
# GCN-NEXT: S_ENDPGM 0
name: reduce_and_saveexec_commuted
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_AND_B64 killed $vcc, $exec, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_and_saveexec_liveout
# GCN: $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc
# GCN-NEXT: $exec = COPY
name: reduce_and_saveexec_liveout
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: and_saveexec
# GCN: $sgpr0_sgpr1 = S_AND_SAVEEXEC_B64 $vcc
# GCN-NEXT: S_ENDPGM 0
name: and_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = COPY $exec
$sgpr2_sgpr3 = S_AND_B64 $sgpr0_sgpr1, killed $vcc, implicit-def $scc
$exec = S_MOV_B64_term $sgpr2_sgpr3
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_or_saveexec
# GCN: $exec = S_OR_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_or_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_xor_saveexec
# GCN: $exec = S_XOR_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_xor_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_XOR_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_andn2_saveexec
# GCN: $exec = S_ANDN2_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_andn2_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_ANDN2_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_orn2_saveexec
# GCN: $exec = S_ORN2_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_orn2_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_ORN2_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_nand_saveexec
# GCN: $exec = S_NAND_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_nand_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_NAND_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_nor_saveexec
# GCN: $exec = S_NOR_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_nor_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_NOR_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---
# GCN-LABEL: name: reduce_xnor_saveexec
# GCN: $exec = S_XNOR_B64 $exec, killed $vcc
# GCN-NEXT: S_ENDPGM 0
name: reduce_xnor_saveexec
tracksRegLiveness: true
body: |
bb.0:
$vcc = IMPLICIT_DEF
$sgpr0_sgpr1 = S_XNOR_B64 $exec, killed $vcc, implicit-def $scc
$exec = COPY killed $sgpr0_sgpr1
S_ENDPGM 0
...
---