1 # RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-optimize-exec-masking %s -o - | FileCheck -check-prefix=GCN %s
4 # GCN-LABEL: name: reduce_and_saveexec
5 # GCN: $exec = S_AND_B64 $exec, killed $vcc
7 name: reduce_and_saveexec
8 tracksRegLiveness: true
12 $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
13 $exec = COPY killed $sgpr0_sgpr1
17 # GCN-LABEL: name: reduce_and_saveexec_commuted
18 # GCN: $exec = S_AND_B64 killed $vcc, $exec
19 # GCN-NEXT: S_ENDPGM 0
20 name: reduce_and_saveexec_commuted
21 tracksRegLiveness: true
25 $sgpr0_sgpr1 = S_AND_B64 killed $vcc, $exec, implicit-def $scc
26 $exec = COPY killed $sgpr0_sgpr1
30 # GCN-LABEL: name: reduce_and_saveexec_liveout
31 # GCN: $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc
32 # GCN-NEXT: $exec = COPY
33 name: reduce_and_saveexec_liveout
34 tracksRegLiveness: true
38 $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
39 $exec = COPY $sgpr0_sgpr1
43 # GCN-LABEL: name: and_saveexec
44 # GCN: $sgpr0_sgpr1 = S_AND_SAVEEXEC_B64 $vcc
45 # GCN-NEXT: S_ENDPGM 0
47 tracksRegLiveness: true
51 $sgpr0_sgpr1 = COPY $exec
52 $sgpr2_sgpr3 = S_AND_B64 $sgpr0_sgpr1, killed $vcc, implicit-def $scc
53 $exec = S_MOV_B64_term $sgpr2_sgpr3
57 # GCN-LABEL: name: reduce_or_saveexec
58 # GCN: $exec = S_OR_B64 $exec, killed $vcc
59 # GCN-NEXT: S_ENDPGM 0
60 name: reduce_or_saveexec
61 tracksRegLiveness: true
65 $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
66 $exec = COPY killed $sgpr0_sgpr1
70 # GCN-LABEL: name: reduce_xor_saveexec
71 # GCN: $exec = S_XOR_B64 $exec, killed $vcc
72 # GCN-NEXT: S_ENDPGM 0
73 name: reduce_xor_saveexec
74 tracksRegLiveness: true
78 $sgpr0_sgpr1 = S_XOR_B64 $exec, killed $vcc, implicit-def $scc
79 $exec = COPY killed $sgpr0_sgpr1
83 # GCN-LABEL: name: reduce_andn2_saveexec
84 # GCN: $exec = S_ANDN2_B64 $exec, killed $vcc
85 # GCN-NEXT: S_ENDPGM 0
86 name: reduce_andn2_saveexec
87 tracksRegLiveness: true
91 $sgpr0_sgpr1 = S_ANDN2_B64 $exec, killed $vcc, implicit-def $scc
92 $exec = COPY killed $sgpr0_sgpr1
96 # GCN-LABEL: name: reduce_orn2_saveexec
97 # GCN: $exec = S_ORN2_B64 $exec, killed $vcc
98 # GCN-NEXT: S_ENDPGM 0
99 name: reduce_orn2_saveexec
100 tracksRegLiveness: true
104 $sgpr0_sgpr1 = S_ORN2_B64 $exec, killed $vcc, implicit-def $scc
105 $exec = COPY killed $sgpr0_sgpr1
109 # GCN-LABEL: name: reduce_nand_saveexec
110 # GCN: $exec = S_NAND_B64 $exec, killed $vcc
111 # GCN-NEXT: S_ENDPGM 0
112 name: reduce_nand_saveexec
113 tracksRegLiveness: true
117 $sgpr0_sgpr1 = S_NAND_B64 $exec, killed $vcc, implicit-def $scc
118 $exec = COPY killed $sgpr0_sgpr1
122 # GCN-LABEL: name: reduce_nor_saveexec
123 # GCN: $exec = S_NOR_B64 $exec, killed $vcc
124 # GCN-NEXT: S_ENDPGM 0
125 name: reduce_nor_saveexec
126 tracksRegLiveness: true
130 $sgpr0_sgpr1 = S_NOR_B64 $exec, killed $vcc, implicit-def $scc
131 $exec = COPY killed $sgpr0_sgpr1
135 # GCN-LABEL: name: reduce_xnor_saveexec
136 # GCN: $exec = S_XNOR_B64 $exec, killed $vcc
137 # GCN-NEXT: S_ENDPGM 0
138 name: reduce_xnor_saveexec
139 tracksRegLiveness: true
143 $sgpr0_sgpr1 = S_XNOR_B64 $exec, killed $vcc, implicit-def $scc
144 $exec = COPY killed $sgpr0_sgpr1