llvm.org GIT mirror llvm / 4b43b47
[AMDGPU] Add support for immediate operand for S_ENDPGM Summary: Add support for immediate operand in S_ENDPGM Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6 Reviewers: alexshap Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59213 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355902 91177308-0d34-0410-b5e6-96231b3b80d8 David Stuttard 11 months ago
99 changed file(s) with 800 addition(s) and 713 deletion(s). Raw diff Collapse all Expand all
3636 if (Val)
3737 return false;
3838
39 MIRBuilder.buildInstr(AMDGPU::S_ENDPGM);
39 MIRBuilder.buildInstr(AMDGPU::S_ENDPGM).addImm(0);
4040 return true;
4141 }
4242
173173 ImmTyNegHi,
174174 ImmTySwizzle,
175175 ImmTyGprIdxMode,
176 ImmTyEndpgm,
176177 ImmTyHigh
177178 };
178179
516517 bool isGPRIdxMode() const;
517518 bool isS16Imm() const;
518519 bool isU16Imm() const;
520 bool isEndpgm() const;
519521
520522 StringRef getExpressionAsToken() const {
521523 assert(isExpr());
705707 case ImmTySwizzle: OS << "Swizzle"; break;
706708 case ImmTyGprIdxMode: OS << "GprIdxMode"; break;
707709 case ImmTyHigh: OS << "High"; break;
710 case ImmTyEndpgm:
711 OS << "Endpgm";
712 break;
708713 }
709714 }
710715
11861191 void cvtSdwaVOPC(MCInst &Inst, const OperandVector &Operands);
11871192 void cvtSDWA(MCInst &Inst, const OperandVector &Operands,
11881193 uint64_t BasicInstType, bool skipVcc = false);
1194
1195 OperandMatchResultTy parseEndpgmOp(OperandVector &Operands);
1196 AMDGPUOperand::Ptr defaultEndpgmImmOperands() const;
11891197 };
11901198
11911199 struct OptionalOperand {
55225530 return AMDGPUOperand::CreateImm(this, 0xf, SMLoc(), AMDGPUOperand::ImmTyDppRowMask);
55235531 }
55245532
5533 AMDGPUOperand::Ptr AMDGPUAsmParser::defaultEndpgmImmOperands() const {
5534 return AMDGPUOperand::CreateImm(this, 0, SMLoc(), AMDGPUOperand::ImmTyEndpgm);
5535 }
5536
55255537 AMDGPUOperand::Ptr AMDGPUAsmParser::defaultBankMask() const {
55265538 return AMDGPUOperand::CreateImm(this, 0xf, SMLoc(), AMDGPUOperand::ImmTyDppBankMask);
55275539 }
57985810 return Match_InvalidOperand;
57995811 }
58005812 }
5813
5814 //===----------------------------------------------------------------------===//
5815 // endpgm
5816 //===----------------------------------------------------------------------===//
5817
5818 OperandMatchResultTy AMDGPUAsmParser::parseEndpgmOp(OperandVector &Operands) {
5819 SMLoc S = Parser.getTok().getLoc();
5820 int64_t Imm = 0;
5821
5822 if (!parseExpr(Imm)) {
5823 // The operand is optional, if not present default to 0
5824 Imm = 0;
5825 }
5826
5827 if (!isUInt<16>(Imm)) {
5828 Error(S, "expected a 16-bit value");
5829 return MatchOperand_ParseFail;
5830 }
5831
5832 Operands.push_back(
5833 AMDGPUOperand::CreateImm(this, Imm, S, AMDGPUOperand::ImmTyEndpgm));
5834 return MatchOperand_Success;
5835 }
5836
5837 bool AMDGPUOperand::isEndpgm() const { return isImmTy(ImmTyEndpgm); }
12081208 O << ')';
12091209 }
12101210
1211 void AMDGPUInstPrinter::printEndpgm(const MCInst *MI, unsigned OpNo,
1212 const MCSubtargetInfo &STI,
1213 raw_ostream &O) {
1214 uint16_t Imm = MI->getOperand(OpNo).getImm();
1215 if (Imm == 0) {
1216 return;
1217 }
1218
1219 O << formatDec(Imm);
1220 }
1221
12111222 #include "AMDGPUGenAsmWriter.inc"
12121223
12131224 void R600InstPrinter::printInst(const MCInst *MI, raw_ostream &O,
212212 const MCSubtargetInfo &STI, raw_ostream &O);
213213 void printHwreg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
214214 raw_ostream &O);
215 void printEndpgm(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
216 raw_ostream &O);
215217 };
216218
217219 class R600InstPrinter : public MCInstPrinter {
175175 .addImm(0); // en
176176
177177 // ... and terminate wavefront.
178 BuildMI(*SkipBB, Insert, DL, TII->get(AMDGPU::S_ENDPGM));
178 BuildMI(*SkipBB, Insert, DL, TII->get(AMDGPU::S_ENDPGM)).addImm(0);
179179
180180 return true;
181181 }
11361136
11371137 if (MBB.succ_empty()) {
11381138 bool HasNoTerminator = MBB.getFirstTerminator() == MBB.end();
1139 if (HasNoTerminator)
1140 BuildMI(MBB, MBB.end(), DebugLoc(),
1141 get(Info->returnsVoid() ? AMDGPU::S_ENDPGM : AMDGPU::SI_RETURN_TO_EPILOG));
1139 if (HasNoTerminator) {
1140 if (Info->returnsVoid()) {
1141 BuildMI(MBB, MBB.end(), DebugLoc(), get(AMDGPU::S_ENDPGM)).addImm(0);
1142 } else {
1143 BuildMI(MBB, MBB.end(), DebugLoc(), get(AMDGPU::SI_RETURN_TO_EPILOG));
1144 }
1145 }
11421146 }
11431147 }
11441148
667667 let IsOptional = 1;
668668 }
669669
670 def EndpgmMatchClass : AsmOperandClass {
671 let Name = "EndpgmImm";
672 let PredicateMethod = "isEndpgm";
673 let ParserMethod = "parseEndpgmOp";
674 let RenderMethod = "addImmOperands";
675 let IsOptional = 1;
676 }
677
670678 def ExpTgtMatchClass : AsmOperandClass {
671679 let Name = "ExpTgt";
672680 let PredicateMethod = "isExpTgt";
682690 def SwizzleImm : Operand {
683691 let PrintMethod = "printSwizzle";
684692 let ParserMatchClass = SwizzleMatchClass;
693 }
694
695 def EndpgmImm : Operand {
696 let PrintMethod = "printEndpgm";
697 let ParserMatchClass = EndpgmMatchClass;
685698 }
686699
687700 def SWaitMatchClass : AsmOperandClass {
246246
247247 // Skip this if the endpgm has any implicit uses, otherwise we would need
248248 // to be careful to update / remove them.
249 // S_ENDPGM always has a single imm operand that is not used other than to
250 // end up in the encoding
249251 MachineInstr &Term = MBB.back();
250 if (Term.getOpcode() != AMDGPU::S_ENDPGM ||
251 Term.getNumOperands() != 0)
252 if (Term.getOpcode() != AMDGPU::S_ENDPGM || Term.getNumOperands() != 1)
252253 continue;
253254
254255 SmallVector Blocks({&MBB});
865865
866866 let isTerminator = 1 in {
867867
868 def S_ENDPGM : SOPP <0x00000001, (ins), "s_endpgm",
869 [(AMDGPUendpgm)]> {
870 let simm16 = 0;
868 def S_ENDPGM : SOPP <0x00000001, (ins EndpgmImm:$simm16), "s_endpgm $simm16"> {
871869 let isBarrier = 1;
872870 let isReturn = 1;
873871 }
10421040 //===----------------------------------------------------------------------===//
10431041 // SOP1 Patterns
10441042 //===----------------------------------------------------------------------===//
1043
1044 def : GCNPat <
1045 (AMDGPUendpgm),
1046 (S_ENDPGM (i16 0))
1047 >;
10451048
10461049 def : GCNPat <
10471050 (i64 (ctpop i64:$src)),
2020 bb.1 (%ir-block.0):
2121 ; CHECK-LABEL: name: test_blockaddress
2222 ; CHECK: [[BLOCK_ADDR:%[0-9]+]]:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
23 ; CHECK: S_ENDPGM implicit [[BLOCK_ADDR]](p0)
23 ; CHECK: S_ENDPGM 0, implicit [[BLOCK_ADDR]](p0)
2424 %0:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
25 S_ENDPGM implicit %0
25 S_ENDPGM 0, implicit %0
2626
2727 ...
3131
3232 ; CHECK-LABEL: name: test_constant_s1
3333 ; CHECK: [[C:%[0-9]+]]:_(s1) = G_CONSTANT i1 false
34 ; CHECK: S_ENDPGM implicit [[C]](s1)
34 ; CHECK: S_ENDPGM 0, implicit [[C]](s1)
3535 %1:_(s1) = G_CONSTANT i1 0
36 S_ENDPGM implicit %1
36 S_ENDPGM 0, implicit %1
3737 ...
3838
3939 ---
2121 bb.1 (%ir-block.0):
2222 ; CHECK-LABEL: name: test_blockaddress
2323 ; CHECK: [[BLOCK_ADDR:%[0-9]+]]:sgpr(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
24 ; CHECK: S_ENDPGM implicit [[BLOCK_ADDR]](p0)
24 ; CHECK: S_ENDPGM 0, implicit [[BLOCK_ADDR]](p0)
2525 %0:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
26 S_ENDPGM implicit %0
26 S_ENDPGM 0, implicit %0
2727
2828 ...
1313 ; CHECK: [[EXTRACT:%[0-9]+]]:sgpr(s32) = G_EXTRACT [[COPY]](s64), 0
1414 ; CHECK: [[EXTRACT1:%[0-9]+]]:sgpr(s32) = G_EXTRACT [[COPY]](s64), 32
1515 ; CHECK: [[MV:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[EXTRACT]](s32), [[EXTRACT1]](s32)
16 ; CHECK: S_ENDPGM implicit [[MV]](s64)
16 ; CHECK: S_ENDPGM 0, implicit [[MV]](s64)
1717 %0:_(s64) = COPY $sgpr0_sgpr1
1818 %1:_(s32) = G_EXTRACT %0, 0
1919 %2:_(s32) = G_EXTRACT %0, 32
2020 %3:_(s64) = G_MERGE_VALUES %1, %2
21 S_ENDPGM implicit %3
21 S_ENDPGM 0, implicit %3
2222 ...
2323
2424 ---
3333 ; CHECK: [[EXTRACT:%[0-9]+]]:vgpr(s32) = G_EXTRACT [[COPY]](s64), 0
3434 ; CHECK: [[EXTRACT1:%[0-9]+]]:vgpr(s32) = G_EXTRACT [[COPY]](s64), 32
3535 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[EXTRACT]](s32), [[EXTRACT1]](s32)
36 ; CHECK: S_ENDPGM implicit [[MV]](s64)
36 ; CHECK: S_ENDPGM 0, implicit [[MV]](s64)
3737 %0:_(s64) = COPY $vgpr0_vgpr1
3838 %1:_(s32) = G_EXTRACT %0, 0
3939 %2:_(s32) = G_EXTRACT %0, 32
4040 %3:_(s64) = G_MERGE_VALUES %1, %2
41 S_ENDPGM implicit %3
41 S_ENDPGM 0, implicit %3
4242 ...
4343
88 bb.0:
99 ; GCN-LABEL: name: trivial_smem_clause_load_smrd4_x1
1010 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
11 ; GCN-NEXT: S_ENDPGM
12 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
13 S_ENDPGM
11 ; GCN-NEXT: S_ENDPGM 0
12 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
13 S_ENDPGM 0
1414 ...
1515 ---
1616 # Trivial clause at beginning of program
2121 ; GCN-LABEL: name: trivial_smem_clause_load_smrd4_x2
2222 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
2323 ; GCN-NEXT: $sgpr1 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
24 ; GCN-NEXT: S_ENDPGM
24 ; GCN-NEXT: S_ENDPGM 0
2525 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
2626 $sgpr1 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
27 S_ENDPGM
27 S_ENDPGM 0
2828 ...
2929 ---
3030 # Trivial clause at beginning of program
3636 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
3737 ; GCN-NEXT: $sgpr1 = S_LOAD_DWORD_IMM $sgpr6_sgpr7, 0, 0
3838 ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
39 ; GCN-NEXT: S_ENDPGM
39 ; GCN-NEXT: S_ENDPGM 0
4040 $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
4141 $sgpr1 = S_LOAD_DWORD_IMM $sgpr6_sgpr7, 0, 0
4242 $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
43 S_ENDPGM
43 S_ENDPGM 0
4444 ...
4545 ---
4646 # Trivial clause at beginning of program
5353 ; GCN-NEXT: $sgpr1 = S_LOAD_DWORD_IMM $sgpr8_sgpr9, 0, 0
5454 ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
5555 ; GCN-NEXT: $sgpr3 = S_LOAD_DWORD_IMM $sgpr16_sgpr17, 0, 0
56 ; GCN-NEXT: S_ENDPGM
56 ; GCN-NEXT: S_ENDPGM 0
5757 $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
5858 $sgpr1 = S_LOAD_DWORD_IMM $sgpr8_sgpr9, 0, 0
5959 $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
6060 $sgpr3 = S_LOAD_DWORD_IMM $sgpr16_sgpr17, 0, 0
61 S_ENDPGM
61 S_ENDPGM 0
6262 ...
6363 ---
6464 # Reuse of same input pointer is OK
6868 ; GCN-LABEL: name: trivial_smem_clause_load_smrd4_x2_sameptr
6969 ; GCN: $sgpr12 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
7070 ; GCN-NEXT: $sgpr13 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
71 ; GCN-NEXT: S_ENDPGM
71 ; GCN-NEXT: S_ENDPGM 0
7272 $sgpr12 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
7373 $sgpr13 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
74 S_ENDPGM
74 S_ENDPGM 0
7575 ...
7676 ---
7777 # 32-bit load partially clobbers its own ptr reg
8181 bb.0:
8282 ; GCN-LABEL: name: smrd_load4_overwrite_ptr_lo
8383 ; GCN: $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
84 ; GCN-NEXT: S_ENDPGM
84 ; GCN-NEXT: S_ENDPGM 0
8585 $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
86 S_ENDPGM
86 S_ENDPGM 0
8787 ...
8888 ---
8989 # 32-bit load partially clobbers its own ptr reg
9393 bb.0:
9494 ; GCN-LABEL: name: smrd_load4_overwrite_ptr_hi
9595 ; GCN: $sgpr11 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
96 ; GCN-NEXT: S_ENDPGM
96 ; GCN-NEXT: S_ENDPGM 0
9797 $sgpr11 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
98 S_ENDPGM
98 S_ENDPGM 0
9999 ...
100100 ---
101101 # 64-bit load clobbers its own ptr reg
105105 bb.0:
106106 ; GCN-LABEL: name: smrd_load8_overwrite_ptr
107107 ; GCN: $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
108 ; GCN-NEXT: S_ENDPGM
108 ; GCN-NEXT: S_ENDPGM 0
109109 $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
110 S_ENDPGM
110 S_ENDPGM 0
111111 ...
112112 ---
113113 # vmcnt has 4 bits, so maximum 16 outstanding loads. The waitcnt
136136 ; GCN-NEXT: $sgpr28 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
137137 ; GCN-NEXT: $sgpr0 = S_LOAD_DWORD_IMM $sgpr30_sgpr31, 0, 0
138138 ; GCN-NEXT: $sgpr0 = S_MOV_B32 $sgpr0, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $sgpr16, implicit $sgpr17, implicit $sgpr18, implicit $sgpr19, implicit $sgpr20, implicit $sgpr21, implicit $sgpr22, implicit $sgpr23, implicit $sgpr24, implicit $sgpr25, implicit $sgpr26, implicit $sgpr27, implicit $sgpr28
139 ; GCN-NEXT: S_ENDPGM
139 ; GCN-NEXT: S_ENDPGM 0
140140 $sgpr13 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
141141 $sgpr14 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
142142 $sgpr15 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
159159
160160 $sgpr0 = S_LOAD_DWORD_IMM $sgpr30_sgpr31, 0, 0
161161 $sgpr0 = S_MOV_B32 $sgpr0, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $sgpr16, implicit $sgpr17, implicit $sgpr18, implicit $sgpr19, implicit $sgpr20, implicit $sgpr21, implicit $sgpr22, implicit $sgpr23, implicit $sgpr24, implicit $sgpr25, implicit $sgpr26, implicit $sgpr27, implicit $sgpr28
162 S_ENDPGM
162 S_ENDPGM 0
163163 ...
164164 ---
165165
171171 ; GCN: $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
172172 ; XNACK-NEXT: S_NOP 0
173173 ; GCN-NEXT: $sgpr12 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
174 ; GCN-NEXT: S_ENDPGM
174 ; GCN-NEXT: S_ENDPGM 0
175175 $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
176176 $sgpr12 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
177 S_ENDPGM
177 S_ENDPGM 0
178178 ...
179179 ---
180180
185185 ; GCN-LABEL: name: break_smem_clause_simple_load_smrd4_hi_ptr
186186 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
187187 ; GCN-NEXT: $sgpr3 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
188 ; GCN-NEXT: S_ENDPGM
188 ; GCN-NEXT: S_ENDPGM 0
189189 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
190190 $sgpr3 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
191 S_ENDPGM
191 S_ENDPGM 0
192192 ...
193193 ---
194194
200200 ; GCN: $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
201201 ; XNACK-NEXT: S_NOP 0
202202 ; GCN-NEXT: $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
203 ; GCN-NEXT: S_ENDPGM
203 ; GCN-NEXT: S_ENDPGM 0
204204 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
205205 $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
206 S_ENDPGM
206 S_ENDPGM 0
207207 ...
208208 ---
209209
214214 ; GCN-LABEL: name: break_smem_clause_simple_load_smrd16_ptr
215215 ; GCN: $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
216216 ; GCN-NEXT: $sgpr12_sgpr13_sgpr14_sgpr15 = S_LOAD_DWORDX4_IMM $sgpr6_sgpr7, 0, 0
217 ; GCN-NEXT: S_ENDPGM
217 ; GCN-NEXT: S_ENDPGM 0
218218 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
219219 $sgpr12_sgpr13_sgpr14_sgpr15 = S_LOAD_DWORDX4_IMM $sgpr6_sgpr7, 0, 0
220 S_ENDPGM
220 S_ENDPGM 0
221221 ...
222222 ---
223223
231231 ; GCN: bb.1:
232232 ; XNACK-NEXT: S_NOP 0
233233 ; GCN-NEXT: $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
234 ; GCN-NEXT: S_ENDPGM
234 ; GCN-NEXT: S_ENDPGM 0
235235 bb.0:
236236 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
237237
238238 bb.1:
239239 $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
240 S_ENDPGM
240 S_ENDPGM 0
241241 ...
242242 ---
243243 # The load clobbers the pointer of the store, so it needs to break.
249249 ; GCN-LABEL: name: break_smem_clause_store_load_into_ptr_smrd4
250250 ; GCN: S_STORE_DWORD_IMM $sgpr16, $sgpr10_sgpr11, 0, 0
251251 ; GCN-NEXT: $sgpr12 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
252 ; GCN-NEXT: S_ENDPGM
252 ; GCN-NEXT: S_ENDPGM 0
253253 S_STORE_DWORD_IMM $sgpr16, $sgpr10_sgpr11, 0, 0
254254 $sgpr12 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
255 S_ENDPGM
255 S_ENDPGM 0
256256 ...
257257 ---
258258 # The load clobbers the data of the store, so it needs to break.
265265 ; GCN-LABEL: name: break_smem_clause_store_load_into_data_smrd4
266266 ; GCN: S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 0, 0
267267 ; GCN-NEXT: $sgpr8 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
268 ; GCN-NEXT: S_ENDPGM
268 ; GCN-NEXT: S_ENDPGM 0
269269 S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 0, 0
270270 $sgpr8 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
271 S_ENDPGM
271 S_ENDPGM 0
272272 ...
273273 ---
274274 # Regular VALU instruction breaks clause, no nop needed
280280 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
281281 ; GCN-NEXT: $vgpr8 = V_MOV_B32_e32 0, implicit $exec
282282 ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
283 ; GCN-NEXT: S_ENDPGM
283 ; GCN-NEXT: S_ENDPGM 0
284284 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
285285 $vgpr8 = V_MOV_B32_e32 0, implicit $exec
286286 $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
287 S_ENDPGM
287 S_ENDPGM 0
288288 ...
289289 ---
290290 # Regular SALU instruction breaks clause, no nop needed
296296 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
297297 ; GCN-NEXT: $sgpr8 = S_MOV_B32 0
298298 ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
299 ; GCN-NEXT: S_ENDPGM
299 ; GCN-NEXT: S_ENDPGM 0
300300 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
301301 $sgpr8 = S_MOV_B32 0
302302 $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
303 S_ENDPGM
303 S_ENDPGM 0
304304 ...
305305 ---
306306 name: ds_inst_breaks_smem_clause
311311 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
312312 ; GCN-NEXT: $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
313313 ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
314 ; GCN-NEXT: S_ENDPGM
314 ; GCN-NEXT: S_ENDPGM 0
315315 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
316316 $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
317317 $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
318 S_ENDPGM
318 S_ENDPGM 0
319319 ...
320320 ---
321321
327327 ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
328328 ; GCN-NEXT: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
329329 ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
330 ; GCN-NEXT: S_ENDPGM
330 ; GCN-NEXT: S_ENDPGM 0
331331 $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
332332 $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
333333 $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
334 S_ENDPGM
334 S_ENDPGM 0
335335 ...
336336 ---
337337 # FIXME: Should this be handled?
343343 ; GCN: $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0, implicit $sgpr12_sgpr13
344344 ; XNACK-NEXT: S_NOP 0
345345 ; GCN-NEXT: $sgpr12_sgpr13 = S_LOAD_DWORDX2_IMM $sgpr6_sgpr7, 0, 0
346 ; GCN-NEXT: S_ENDPGM
346 ; GCN-NEXT: S_ENDPGM 0
347347 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0, implicit $sgpr12_sgpr13
348348 $sgpr12_sgpr13 = S_LOAD_DWORDX2_IMM $sgpr6_sgpr7, 0, 0
349 S_ENDPGM
350 ...
349 S_ENDPGM 0
350 ...
77 bb.0:
88 ; GCN-LABEL: name: trivial_clause_load_flat4_x1
99 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
10 ; GCN-NEXT: S_ENDPGM
11
12 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
13 S_ENDPGM
10 ; GCN-NEXT: S_ENDPGM 0
11
12 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
13 S_ENDPGM 0
1414 ...
1515 ---
1616 # Trivial clause at beginning of program
2121 ; GCN-LABEL: name: trivial_clause_load_flat4_x2
2222 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
2323 ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
24 ; GCN-NEXT: S_ENDPGM
24 ; GCN-NEXT: S_ENDPGM 0
2525
2626 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
2727 $vgpr1 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
28 S_ENDPGM
28 S_ENDPGM 0
2929 ...
3030 ---
3131 # Trivial clause at beginning of program
3737 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
3838 ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr5_vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
3939 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr7_vgpr8, 0, 0, 0, implicit $exec, implicit $flat_scr
40 ; GCN-NEXT: S_ENDPGM
40 ; GCN-NEXT: S_ENDPGM 0
4141
4242 $vgpr0 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
4343 $vgpr1 = FLAT_LOAD_DWORD $vgpr5_vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
4444 $vgpr2 = FLAT_LOAD_DWORD $vgpr7_vgpr8, 0, 0, 0, implicit $exec, implicit $flat_scr
45 S_ENDPGM
45 S_ENDPGM 0
4646 ...
4747 ---
4848 # Trivial clause at beginning of program
5555 ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
5656 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr8_vgpr9, 0, 0, 0, implicit $exec, implicit $flat_scr
5757 ; GCN-NEXT: $vgpr3 = FLAT_LOAD_DWORD $vgpr10_vgpr11, 0, 0, 0, implicit $exec, implicit $flat_scr
58 ; GCN-NEXT: S_ENDPGM
58 ; GCN-NEXT: S_ENDPGM 0
5959
6060 $vgpr0 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
6161 $vgpr1 = FLAT_LOAD_DWORD $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
6262 $vgpr2 = FLAT_LOAD_DWORD $vgpr8_vgpr9, 0, 0, 0, implicit $exec, implicit $flat_scr
6363 $vgpr3 = FLAT_LOAD_DWORD $vgpr10_vgpr11, 0, 0, 0, implicit $exec, implicit $flat_scr
64 S_ENDPGM
64 S_ENDPGM 0
6565 ...
6666 ---
6767 # Reuse of same input pointer is OK
7272 ; GCN-LABEL: name: trivial_clause_load_flat4_x2_sameptr
7373 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
7474 ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
75 ; GCN-NEXT: S_ENDPGM
75 ; GCN-NEXT: S_ENDPGM 0
7676
7777 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
7878 $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
79 S_ENDPGM
79 S_ENDPGM 0
8080 ...
8181 ---
8282 # 32-bit load partially clobbers its own ptr reg
8686 bb.0:
8787 ; GCN-LABEL: name: flat_load4_overwrite_ptr_lo
8888 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
89 ; GCN-NEXT: S_ENDPGM
89 ; GCN-NEXT: S_ENDPGM 0
9090
9191 $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
92 S_ENDPGM
92 S_ENDPGM 0
9393 ...
9494 ---
9595 # 32-bit load partially clobbers its own ptr reg
9999 bb.0:
100100 ; GCN-LABEL: name: flat_load4_overwrite_ptr_hi
101101 ; GCN: $vgpr1 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
102 ; GCN-NEXT: S_ENDPGM
102 ; GCN-NEXT: S_ENDPGM 0
103103
104104 $vgpr1 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
105 S_ENDPGM
105 S_ENDPGM 0
106106 ...
107107 ---
108108 # 64-bit load clobbers its own ptr reg
112112 bb.0:
113113 ; GCN-LABEL: name: flat_load8_overwrite_ptr
114114 ; GCN: $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
115 ; GCN-NEXT: S_ENDPGM
115 ; GCN-NEXT: S_ENDPGM 0
116116
117117 $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
118 S_ENDPGM
118 S_ENDPGM 0
119119 ...
120120 ---
121121 # vmcnt has 4 bits, so maximum 16 outstanding loads. The waitcnt
146146 ; XNACK-NEXT: S_NOP 0
147147 ; GCN-NEXT: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
148148 ; GCN-NEXT: $sgpr0 = S_MOV_B32 $sgpr0, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4, implicit $vgpr5, implicit $vgpr6, implicit $vgpr7, implicit $vgpr8, implicit $vgpr9, implicit $vgpr10, implicit $vgpr11, implicit $vgpr12, implicit $vgpr13, implicit $vgpr14, implicit $vgpr15, implicit $vgpr16, implicit $vgpr17, implicit $vgpr18
149 ; GCN-NEXT: S_ENDPGM
149 ; GCN-NEXT: S_ENDPGM 0
150150
151151 $vgpr2 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
152152 $vgpr3 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
170170
171171 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
172172 $sgpr0 = S_MOV_B32 $sgpr0, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4, implicit $vgpr5, implicit $vgpr6, implicit $vgpr7, implicit $vgpr8, implicit $vgpr9, implicit $vgpr10, implicit $vgpr11, implicit $vgpr12, implicit $vgpr13, implicit $vgpr14, implicit $vgpr15, implicit $vgpr16, implicit $vgpr17, implicit $vgpr18
173 S_ENDPGM
173 S_ENDPGM 0
174174 ...
175175 ---
176176
182182 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
183183 ; XNACK-NEXT: S_NOP 0
184184 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
185 ; GCN-NEXT: S_ENDPGM
186
187 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
188 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
189 S_ENDPGM
185 ; GCN-NEXT: S_ENDPGM 0
186
187 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
188 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
189 S_ENDPGM 0
190190 ...
191191 ---
192192
198198 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
199199 ; XNACK-NEXT: S_NOP 0
200200 ; GCN-NEXT: $vgpr3 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
201 ; GCN-NEXT: S_ENDPGM
201 ; GCN-NEXT: S_ENDPGM 0
202202
203203 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
204204 $vgpr3 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
205 S_ENDPGM
205 S_ENDPGM 0
206206 ...
207207 ---
208208
214214 ; GCN: $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
215215 ; XNACK-NEXT: S_NOP 0
216216 ; GCN-NEXT: $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
217 ; GCN-NEXT: S_ENDPGM
217 ; GCN-NEXT: S_ENDPGM 0
218218
219219 $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
220220 $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
221 S_ENDPGM
221 S_ENDPGM 0
222222 ...
223223 ---
224224
231231 ; GCN: $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
232232 ; XNACK-NEXT: S_NOP 0
233233 ; GCN-NEXT: $vgpr2_vgpr3_vgpr4_vgpr5 = FLAT_LOAD_DWORDX4 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
234 ; GCN-NEXT: S_ENDPGM
234 ; GCN-NEXT: S_ENDPGM 0
235235 $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
236236 $vgpr2_vgpr3_vgpr4_vgpr5 = FLAT_LOAD_DWORDX4 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
237 S_ENDPGM
237 S_ENDPGM 0
238238 ...
239239 ---
240240
252252 ; GCN: bb.1:
253253 ; XNACK-NEXT: S_NOP 0
254254 ; GCN-NEXT: $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
255 ; GCN-NEXT: S_ENDPGM
255 ; GCN-NEXT: S_ENDPGM 0
256256
257257 bb.0:
258258 $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
259259
260260 bb.1:
261261 $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
262 S_ENDPGM
262 S_ENDPGM 0
263263 ...
264264 ---
265265 # The load clobbers the pointer of the store, so it needs to break.
271271 ; GCN-LABEL: name: break_clause_store_load_into_ptr_flat4
272272 ; GCN: FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
273273 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
274 ; GCN-NEXT: S_ENDPGM
274 ; GCN-NEXT: S_ENDPGM 0
275275
276276 FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
277277 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
278 S_ENDPGM
278 S_ENDPGM 0
279279 ...
280280 ---
281281 # The load clobbers the data of the store, so it needs to break.
288288 ; GCN-LABEL: name: break_clause_store_load_into_data_flat4
289289 ; GCN: FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
290290 ; GCN-NEXT: $vgpr0 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
291 ; GCN-NEXT: S_ENDPGM
291 ; GCN-NEXT: S_ENDPGM 0
292292
293293 FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
294294 $vgpr0 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
295 S_ENDPGM
295 S_ENDPGM 0
296296 ...
297297 ---
298298 # Regular VALU instruction breaks clause, no nop needed
306306 ; GCN-NEXT: $vgpr8 = V_MOV_B32_e32 0, implicit $exec
307307 ; XNACK-NEXT: S_NOP 0
308308 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
309 ; GCN-NEXT: S_ENDPGM
309 ; GCN-NEXT: S_ENDPGM 0
310310
311311 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
312312 $vgpr8 = V_MOV_B32_e32 0, implicit $exec
313313 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
314 S_ENDPGM
314 S_ENDPGM 0
315315 ...
316316 ---
317317 # Regular SALU instruction breaks clause, no nop needed
325325 ; GCN-NEXT: $sgpr8 = S_MOV_B32 0
326326 ; XNACK-NEXT: S_NOP 0
327327 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
328 ; GCN-NEXT: S_ENDPGM
328 ; GCN-NEXT: S_ENDPGM 0
329329
330330 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
331331 $sgpr8 = S_MOV_B32 0
332332 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
333 S_ENDPGM
333 S_ENDPGM 0
334334 ...
335335 ---
336336
343343 ; GCN-NEXT: $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
344344 ; XNACK-NEXT: S_NOP 0
345345 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
346 ; GCN-NEXT: S_ENDPGM
346 ; GCN-NEXT: S_ENDPGM 0
347347
348348 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
349349 $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
350350 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
351 S_ENDPGM
351 S_ENDPGM 0
352352 ...
353353 ---
354354
360360 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
361361 ; GCN-NEXT: $sgpr8 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
362362 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
363 ; GCN-NEXT: S_ENDPGM
363 ; GCN-NEXT: S_ENDPGM 0
364364
365365 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
366366 $sgpr8 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
367367 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
368 S_ENDPGM
368 S_ENDPGM 0
369369 ...
370370 ---
371371 # FIXME: Should this be handled?
377377 ; GCN: $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr, implicit $vgpr4_vgpr5
378378 ; XNACK-NEXT: S_NOP 0
379379 ; GCN-NEXT: $vgpr4_vgpr5 = FLAT_LOAD_DWORDX2 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
380 ; GCN-NEXT: S_ENDPGM
380 ; GCN-NEXT: S_ENDPGM 0
381381
382382 $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr, implicit $vgpr4_vgpr5
383383 $vgpr4_vgpr5 = FLAT_LOAD_DWORDX2 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
384 S_ENDPGM
384 S_ENDPGM 0
385385 ...
386386 ---
387387 name: trivial_clause_load_mubuf4_x2
391391 ; GCN-LABEL: name: trivial_clause_load_mubuf4_x2
392392 ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
393393 ; GCN-NEXT: $vgpr3 = BUFFER_LOAD_DWORD_OFFEN $vgpr4, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
394 ; GCN-NEXT: S_ENDPGM
394 ; GCN-NEXT: S_ENDPGM 0
395395
396396 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
397397 $vgpr3 = BUFFER_LOAD_DWORD_OFFEN $vgpr4, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
398 S_ENDPGM
398 S_ENDPGM 0
399399 ...
400400 ---
401401 name: break_clause_simple_load_mubuf_offen_ptr
406406 ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
407407 ; XNACK-NEXT: S_NOP 0
408408 ; GCN-NEXT: $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr3, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
409 ; GCN-NEXT: S_ENDPGM
409 ; GCN-NEXT: S_ENDPGM 0
410410
411411 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
412412 $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr3, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
413 S_ENDPGM
413 S_ENDPGM 0
414414 ...
415415 ---
416416 # BUFFER instructions overwriting their own inputs is supposedly OK.
423423 ; GCN: $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
424424 ; GCN-NEXT: $vgpr1 = V_MOV_B32_e32 0, implicit $exec
425425 ; GCN-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
426 ; GCN-NEXT: S_ENDPGM
426 ; GCN-NEXT: S_ENDPGM 0
427427 $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
428428 $vgpr1 = V_MOV_B32_e32 0, implicit $exec
429429 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
430 S_ENDPGM
430 S_ENDPGM 0
431431 ...
432432 ---
433433 # Break a clause from interference between mubuf and flat instructions
440440 ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
441441 ; XNACK-NEXT: S_NOP 0
442442 ; GCN-NEXT: $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
443 ; GCN-NEXT: S_ENDPGM
443 ; GCN-NEXT: S_ENDPGM 0
444444
445445 $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
446446 $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
447 S_ENDPGM
447 S_ENDPGM 0
448448 ...
449449 # Break a clause from interference between mubuf and flat instructions
450450
453453 # GCN-NEXT: $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4
454454 # XNACK-NEXT: S_NOP 0
455455 # GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3
456 # GCN-NEXT: S_ENDPGM
456 # GCN-NEXT: S_ENDPGM 0
457457 name: break_clause_mubuf_load_flat_load
458458
459459 body: |
461461 $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
462462 $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
463463
464 S_ENDPGM
464 S_ENDPGM 0
465465 ...
466466 ---
467467
473473 ; GCN: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
474474 ; XNACK-NEXT: S_NOP 0
475475 ; GCN-NEXT: $vgpr4 = FLAT_ATOMIC_ADD_RTN $vgpr5_vgpr6, $vgpr7, 0, 0, implicit $exec, implicit $flat_scr
476 ; GCN-NEXT: S_ENDPGM
476 ; GCN-NEXT: S_ENDPGM 0
477477
478478 $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
479479 $vgpr4 = FLAT_ATOMIC_ADD_RTN $vgpr5_vgpr6, $vgpr7, 0, 0, implicit $exec, implicit $flat_scr
480 S_ENDPGM
480 S_ENDPGM 0
481481 ...
482482 ---
483483 name: break_clause_atomic_nortn_ptr_load_flat4
487487 ; GCN-LABEL: name: break_clause_atomic_nortn_ptr_load_flat4
488488 ; GCN: FLAT_ATOMIC_ADD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec, implicit $flat_scr
489489 ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
490 ; GCN-NEXT: S_ENDPGM
490 ; GCN-NEXT: S_ENDPGM 0
491491
492492 FLAT_ATOMIC_ADD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec, implicit $flat_scr
493493 $vgpr2 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
494 S_ENDPGM
494 S_ENDPGM 0
495495 ...
496496 ---
497497
503503 ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
504504 ; XNACK-NEXT: S_NOP 0
505505 ; GCN-NEXT: $vgpr2 = BUFFER_ATOMIC_ADD_OFFEN_RTN $vgpr2, $vgpr5, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
506 ; GCN-NEXT: S_ENDPGM
506 ; GCN-NEXT: S_ENDPGM 0
507507
508508 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
509509 $vgpr2 = BUFFER_ATOMIC_ADD_OFFEN_RTN $vgpr2, $vgpr5, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
510 S_ENDPGM
510 S_ENDPGM 0
511511 ...
512512 ---
513513
518518 ; GCN-LABEL: name: break_clause_atomic_nortn_ptr_load_mubuf4
519519 ; GCN: BUFFER_ATOMIC_ADD_OFFEN $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
520520 ; GCN-NEXT: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
521 ; GCN-NEXT: S_ENDPGM
521 ; GCN-NEXT: S_ENDPGM 0
522522
523523 BUFFER_ATOMIC_ADD_OFFEN $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
524524 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
525 S_ENDPGM
525 S_ENDPGM 0
526526 ...
527527 ---
528528 # Make sure there is no assert on mubuf instructions which do not have
534534 ; GCN-LABEL: name: no_break_clause_mubuf_load_novaddr
535535 ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
536536 ; GCN-NEXT: $vgpr3 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
537 ; GCN-NEXT: S_ENDPGM
537 ; GCN-NEXT: S_ENDPGM 0
538538 $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
539539 $vgpr3 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
540 S_ENDPGM
540 S_ENDPGM 0
541541 ...
542542 ---
543543 # Loads and stores using different addresses theoretically does not
556556 $vgpr10 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
557557 FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
558558 $vgpr11 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
559 S_ENDPGM
559 S_ENDPGM 0
560560 ...
561561 ---
562562 # Loads and stores using the same address needs a nop.
575575 $vgpr10 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
576576 FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
577577 $vgpr11 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
578 S_ENDPGM
579 ...
578 S_ENDPGM 0
579 ...
5858 %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
5959 %21 = V_MAX_F32_e64 0, killed %20, 0, killed %20, 0, 0, implicit $exec
6060 BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
61 S_ENDPGM
61 S_ENDPGM 0
6262
6363 ...
6464 ---
120120 %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
121121 %21 = V_MAX_F32_e64 0, killed %20, 0, killed %20, 1, 3, implicit $exec
122122 BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
123 S_ENDPGM
123 S_ENDPGM 0
124124 ...
125125 ---
126126 # Don't fold a mul that looks like an omod if itself has omod set
183183 %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
184184 %21 = V_MUL_F32_e64 0, killed %20, 0, 1056964608, 0, 3, implicit $exec
185185 BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
186 S_ENDPGM
186 S_ENDPGM 0
187187
188188 ...
189189 ---
248248 %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
249249 %21 = V_MUL_F32_e64 0, killed %20, 0, 1056964608, 1, 0, implicit $exec
250250 BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
251 S_ENDPGM
251 S_ENDPGM 0
252252
253253 ...
254254
325325 %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
326326 %21 = V_ADD_F32_e64 0, killed %20, 0, killed %20, 0, 3, implicit $exec
327327 BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
328 S_ENDPGM
328 S_ENDPGM 0
329329
330330 ...
331331 ---
390390 %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
391391 %21 = V_ADD_F32_e64 0, killed %20, 0, killed %20, 1, 0, implicit $exec
392392 BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
393 S_ENDPGM
393 S_ENDPGM 0
394394
395395 ...
396396 ---
2525 $vgpr1 = V_ADDC_U32_e32 $vgpr3, killed $vgpr6, implicit-def dead $vcc, implicit $vcc, implicit $exec
2626 FLAT_STORE_DWORD $vgpr2_vgpr3, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
2727 FLAT_STORE_DWORD $vgpr0_vgpr1, killed $vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
28 S_ENDPGM
28 S_ENDPGM 0
2929
3030 ...
3030 %15:sreg_64_xexec = V_CMP_EQ_U32_e64 0, %14, implicit $exec
3131 %16:vgpr_32 = V_CNDMASK_B32_e64 0, 1, %15, implicit $exec
3232 BUFFER_STORE_DWORD_OFFEN_exact %16, undef %17:vgpr_32, undef %18:sreg_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable store 4 into constant-pool, align 1, addrspace 4)
33 S_ENDPGM
33 S_ENDPGM 0
3434
3535 bb.2:
3636 successors: %bb.3, %bb.4
128128 %29:vgpr_32 = V_ADD_F32_e32 0, killed %28, implicit $exec
129129 $m0 = S_MOV_B32 -1
130130 DS_WRITE_B32 undef %30:vgpr_32, killed %29, 0, 0, implicit $m0, implicit $exec :: (store 4 into `i32 addrspace(3)* undef`, addrspace 3)
131 S_ENDPGM
131 S_ENDPGM 0
132132 ...
263263 %115:vgpr_32 = V_MAX_F32_e32 0, killed %114, implicit $exec
264264 %116:vgpr_32 = V_CVT_PKRTZ_F16_F32_e64 0, killed %115, 0, 1065353216, 0, 0, implicit $exec
265265 EXP 0, undef %117:vgpr_32, killed %116, undef %118:vgpr_32, undef %119:vgpr_32, -1, -1, 15, implicit $exec
266 S_ENDPGM
266 S_ENDPGM 0
267267 ...
155155 %54:vreg_128 = COPY killed %38
156156 %55:vgpr_32 = V_FMA_F32 0, killed %54.sub1, 0, target-flags(amdgpu-gotprel32-lo) 1056964608, 0, 1056964608, 0, 0, implicit $exec
157157 EXP 1, undef %56:vgpr_32, killed %55, undef %57:vgpr_32, undef %58:vgpr_32, -1, 0, 15, implicit $exec
158 S_ENDPGM
158 S_ENDPGM 0
159159
160160 bb.18:
161161 successors: %bb.7(0x80000000)
179179 successors: %bb.21(0x80000000)
180180
181181 bb.21:
182 S_ENDPGM
182 S_ENDPGM 0
183183 ...
9292 undef %32.sub0:vreg_128 = COPY killed %31.sub0
9393 %32.sub2:vreg_128 = COPY %33
9494 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %32:vreg_128
95 S_ENDPGM
95 S_ENDPGM 0
9696
9797 ...
5454 %9 = S_AND_B32 killed %7, killed %8, implicit-def dead $scc
5555 %10 = COPY %9
5656 BUFFER_STORE_DWORD_OFFSET killed %10, killed %6, 0, 0, 0, 0, 0, implicit $exec
57 S_ENDPGM
57 S_ENDPGM 0
5858
5959 ...
6060 ---
157157 %31 = V_AND_B32_e64 %34, %34, implicit $exec
158158 FLAT_STORE_DWORD %37, %31, 0, 0, 0, implicit $exec, implicit $flat_scr
159159
160 S_ENDPGM
160 S_ENDPGM 0
161161
162162 ...
163163 ---
219219 %12 = S_LSHL_B32 killed %5, 12, implicit-def dead $scc
220220 %13 = COPY %12
221221 BUFFER_STORE_DWORD_OFFSET killed %13, killed %10, 0, 0, 0, 0, 0, implicit $exec
222 S_ENDPGM
222 S_ENDPGM 0
223223
224224 ...
225225 ---
360360 %28 = V_LSHL_B32_e32 %27, %6, implicit $exec
361361 FLAT_STORE_DWORD %20, %28, 0, 0, 0, implicit $exec, implicit $flat_scr
362362
363 S_ENDPGM
363 S_ENDPGM 0
364364
365365 ...
366366 ---
419419 %12 = S_ASHR_I32 killed %5, 12, implicit-def dead $scc
420420 %13 = COPY %12
421421 BUFFER_STORE_DWORD_OFFSET killed %13, killed %10, 0, 0, 0, 0, 0, implicit $exec
422 S_ENDPGM
422 S_ENDPGM 0
423423
424424 ...
425425
568568 %28 = V_ASHR_I32_e32 %27, %35, implicit $exec
569569 FLAT_STORE_DWORD %20, %28, 0, 0, 0, implicit $exec, implicit $flat_scr
570570
571 S_ENDPGM
571 S_ENDPGM 0
572572
573573 ...
574574 ---
627627 %12 = S_LSHR_B32 killed %5, 12, implicit-def dead $scc
628628 %13 = COPY %12
629629 BUFFER_STORE_DWORD_OFFSET killed %13, killed %10, 0, 0, 0, 0, 0, implicit $exec
630 S_ENDPGM
630 S_ENDPGM 0
631631
632632 ...
633633 ---
777777 %28 = V_LSHR_B32_e32 %27, %35, implicit $exec
778778 FLAT_STORE_DWORD %20, %28, 0, 0, 0, implicit $exec, implicit $flat_scr
779779
780 S_ENDPGM
780 S_ENDPGM 0
781781
782782 ...
783783 ---
787787 # GCN-LABEL: name: undefined_vreg_operand{{$}}
788788 # GCN: bb.0
789789 # GCN-NEXT: FLAT_STORE_DWORD undef %3:vreg_64, undef %1:vgpr_32,
790 # GCN-NEXT: S_ENDPGM
790 # GCN-NEXT: S_ENDPGM 0
791791 name: undefined_vreg_operand
792792 tracksRegLiveness: true
793793 registers:
800800 %0 = V_MOV_B32_e32 0, implicit $exec
801801 %2 = V_XOR_B32_e64 killed %0, undef %1, implicit $exec
802802 FLAT_STORE_DWORD undef %3, %2, 0, 0, 0, implicit $exec, implicit $flat_scr
803 S_ENDPGM
803 S_ENDPGM 0
804804
805805 ...
806806 ---
827827 bb.3:
828828 liveins: $vcc
829829 SI_END_CF %0, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
830 S_ENDPGM implicit $vcc
830 S_ENDPGM 0, implicit $vcc
831831
832832 ...
833833 ---
834834 # GCN-LABEL: name: constant_fold_lshl_or_reg0_immreg_reg{{$}}
835835 # GCN: %2:vgpr_32 = COPY $vgpr0, implicit $exec
836 # GCN-NEXT: S_ENDPGM implicit %2
836 # GCN-NEXT: S_ENDPGM 0, implicit %2
837837
838838 name: constant_fold_lshl_or_reg0_immreg_reg
839839 alignment: 0
850850 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
851851 %1:vgpr_32 = V_MOV_B32_e32 16, implicit $exec
852852 %2:vgpr_32 = V_LSHL_OR_B32 %0,%1, $vgpr0, implicit $exec
853 S_ENDPGM implicit %2
853 S_ENDPGM 0, implicit %2
854854
855855 ...
856856
858858
859859 # GCN-LABEL: name: constant_fold_lshl_or_reg0_immreg_imm{{$}}
860860 # GCN: %2:vgpr_32 = V_MOV_B32_e32 10, implicit $exec
861 # GCN-NEXT: S_ENDPGM implicit %2
861 # GCN-NEXT: S_ENDPGM 0, implicit %2
862862
863863 name: constant_fold_lshl_or_reg0_immreg_imm
864864 alignment: 0
874874 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
875875 %1:vgpr_32 = V_MOV_B32_e32 16, implicit $exec
876876 %2:vgpr_32 = V_LSHL_OR_B32 %0, %1, 10, implicit $exec
877 S_ENDPGM implicit %2
877 S_ENDPGM 0, implicit %2
878878
879879 ...
880880
882882
883883 # GCN-LABEL: name: constant_fold_lshl_or_reg0_immreg_immreg{{$}}
884884 # GCN: %3:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec, implicit $exec
885 # GCN-NEXT: S_ENDPGM implicit %3
885 # GCN-NEXT: S_ENDPGM 0, implicit %3
886886
887887 name: constant_fold_lshl_or_reg0_immreg_immreg
888888 alignment: 0
899899 %1:vgpr_32 = V_MOV_B32_e32 16, implicit $exec
900900 %2:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
901901 %3:vgpr_32 = V_LSHL_OR_B32 %0, %1, %2, implicit $exec
902 S_ENDPGM implicit %3
903
904 ...
902 S_ENDPGM 0, implicit %3
903
904 ...
310310 %44:vgpr_32 = V_MAD_F32 0, killed %43, 0, 0, 0, 0, 0, 0, implicit $exec
311311 %45:vgpr_32 = V_CVT_PKRTZ_F16_F32_e64 0, killed %44, 0, undef %46:vgpr_32, 0, 0, implicit $exec
312312 EXP_DONE 0, killed %45, undef %47:vgpr_32, undef %48:vgpr_32, undef %49:vgpr_32, -1, -1, 15, implicit $exec
313 S_ENDPGM
313 S_ENDPGM 0
314314
315315 bb.6.DummyReturnBlock:
316 S_ENDPGM
316 S_ENDPGM 0
317317
318318 ...
11
22 # GCN-LABEL: name: kill_all
33 # GCN: bb.0:
4 # GCN-NEXT: S_ENDPGM
4 # GCN-NEXT: S_ENDPGM 0
55 name: kill_all
66 tracksRegLiveness: true
77 registers:
1919 %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
2020 %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit $exec
2121 %4 = S_ADD_U32 %3, 1, implicit-def $scc
22 S_ENDPGM
22 S_ENDPGM 0
2323 ...
2424 ---
2525 # GCN-LABEL: name: load_without_memoperand
2626 # GCN: $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
2727 # GCN-NEXT: dead %1:vgpr_32 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr
28 # GCN-NEXT: S_ENDPGM
28 # GCN-NEXT: S_ENDPGM 0
2929 name: load_without_memoperand
3030 tracksRegLiveness: true
3131 registers:
4343 %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr
4444 %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit $exec
4545 %4 = S_ADD_U32 %3, 1, implicit-def $scc
46 S_ENDPGM
46 S_ENDPGM 0
4747 ...
4848 ---
4949 # GCN-LABEL: name: load_volatile
5050 # GCN: $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
5151 # GCN-NEXT: dead %1:vgpr_32 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4)
52 # GCN-NEXT: S_ENDPGM
52 # GCN-NEXT: S_ENDPGM 0
5353 name: load_volatile
5454 tracksRegLiveness: true
5555 registers:
6767 %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4)
6868 %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit $exec
6969 %4 = S_ADD_U32 %3, 1, implicit-def $scc
70 S_ENDPGM
70 S_ENDPGM 0
7171 ...
7272 ---
7373 # GCN-LABEL: name: store
7474 # GCN: $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
7575 # GCN-NEXT: FLAT_STORE_DWORD %0, %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
76 # GCN-NEXT: S_ENDPGM
76 # GCN-NEXT: S_ENDPGM 0
7777 name: store
7878 tracksRegLiveness: true
7979 registers:
8686 %1 = IMPLICIT_DEF
8787 $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
8888 FLAT_STORE_DWORD %0, %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
89 S_ENDPGM
89 S_ENDPGM 0
9090 ...
9191 ---
9292 # GCN-LABEL: name: barrier
9393 # GCN: $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
9494 # GCN-NEXT: S_BARRIER
95 # GCN-NEXT: S_ENDPGM
95 # GCN-NEXT: S_ENDPGM 0
9696 name: barrier
9797 tracksRegLiveness: true
9898 body: |
100100 $vcc = IMPLICIT_DEF
101101 $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
102102 S_BARRIER
103 S_ENDPGM
103 S_ENDPGM 0
104104 ...
105105 ---
106106 # GCN-LABEL: name: call
107107 # GCN: $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
108108 # GCN-NEXT: $sgpr4_sgpr5 = S_SWAPPC_B64 $sgpr2_sgpr3
109 # GCN-NEXT: S_ENDPGM
109 # GCN-NEXT: S_ENDPGM 0
110110 name: call
111111 tracksRegLiveness: true
112112 body: |
114114 $vcc = IMPLICIT_DEF
115115 $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
116116 $sgpr4_sgpr5 = S_SWAPPC_B64 $sgpr2_sgpr3
117 S_ENDPGM
117 S_ENDPGM 0
118118 ...
119119 ---
120120 # GCN-LABEL: name: exp
121121 # GCN: $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
122122 # GCN-NEXT: EXP 32, undef %0:vgpr_32, undef %1:vgpr_32, %2, undef %3:vgpr_32, 0, 0, 15, implicit $exec
123 # GCN-NEXT: S_ENDPGM
123 # GCN-NEXT: S_ENDPGM 0
124124 name: exp
125125 tracksRegLiveness: true
126126 registers:
134134 %2 = IMPLICIT_DEF
135135 $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
136136 EXP 32, undef %0, undef %1, killed %2, undef %3, 0, 0, 15, implicit $exec
137 S_ENDPGM
137 S_ENDPGM 0
138138 ...
139139 ---
140140 # GCN-LABEL: name: return_to_epilog
155155 # GCN-NEXT: successors: %bb.1
156156 # GCN-NOT: S_OR_B64
157157 # GCN: bb.1:
158 # GCN-NEXT: S_ENDPGM
158 # GCN-NEXT: S_ENDPGM 0
159159 name: split_block
160160 tracksRegLiveness: true
161161 registers:
173173 %2 = IMPLICIT_DEF
174174 %1 = V_ADD_F32_e64 0, killed %0, 0, 1, 0, 0, implicit $exec
175175 %3 = S_ADD_U32 %2, 1, implicit-def $scc
176 S_ENDPGM
176 S_ENDPGM 0
177177 ...
178178 ---
179179 # GCN-LABEL: name: split_block_empty_block
182182 # GCN-NOT: S_OR_B64
183183 # GCN: bb.1:
184184 # GCN: bb.2:
185 # GCN-NEXT: S_ENDPGM
185 # GCN-NEXT: S_ENDPGM 0
186186 name: split_block_empty_block
187187 tracksRegLiveness: true
188188 body: |
193193 bb.1:
194194
195195 bb.2:
196 S_ENDPGM
196 S_ENDPGM 0
197197 ...
198198 ---
199199 # GCN-LABEL: name: split_block_uncond_branch
202202 # GCN: S_BRANCH %bb.1
203203 # GCN-NOT: S_OR_B64
204204 # GCN: bb.1:
205 # GCN-NEXT: S_ENDPGM
205 # GCN-NEXT: S_ENDPGM 0
206206 name: split_block_uncond_branch
207207 tracksRegLiveness: true
208208 body: |
212212 S_BRANCH %bb.1
213213
214214 bb.1:
215 S_ENDPGM
215 S_ENDPGM 0
216216 ...
217217 ---
218218 # GCN-LABEL: name: split_block_cond_branch
222222 # GCN: S_CBRANCH_VCCNZ %bb.2, implicit undef $vcc
223223 # GCN: bb.1:
224224 # GCN: bb.2:
225 # GCN-NEXT: S_ENDPGM
225 # GCN-NEXT: S_ENDPGM 0
226226 name: split_block_cond_branch
227227 tracksRegLiveness: true
228228 body: |
234234 bb.1:
235235
236236 bb.2:
237 S_ENDPGM
237 S_ENDPGM 0
238238 ...
239239 ---
240240 # GCN-LABEL: name: two_preds_both_dead
247247 # GCN-NOT: S_AND
248248 # GCN: S_BRANCH %bb.2
249249 # GCN: bb.2:
250 # GCN-NEXT: S_ENDPGM
250 # GCN-NEXT: S_ENDPGM 0
251251 name: two_preds_both_dead
252252 tracksRegLiveness: true
253253 body: |
262262 S_BRANCH %bb.2
263263
264264 bb.2:
265 S_ENDPGM
265 S_ENDPGM 0
266266 ...
267267 ---
268268 # GCN-LABEL: name: two_preds_one_dead
276276 # GCN-NOT: S_AND
277277 # GCN: S_BRANCH %bb.2
278278 # GCN: bb.2:
279 # GCN-NEXT: S_ENDPGM
279 # GCN-NEXT: S_ENDPGM 0
280280 name: two_preds_one_dead
281281 tracksRegLiveness: true
282282 body: |
292292 S_BRANCH %bb.2
293293
294294 bb.2:
295 S_ENDPGM
295 S_ENDPGM 0
296296 ...
297297
298298 # GCN-LABEL: name: implicit_use_on_s_endpgm
299299 # GCN: V_ADD_I32
300300 # GCN: COPY
301301 # GCN: V_ADDC_U32
302 # GCN: S_ENDPGM implicit %3
302 # GCN: S_ENDPGM 0, implicit %3
303303 name: implicit_use_on_s_endpgm
304304 tracksRegLiveness: true
305305
308308 dead %0:vgpr_32 = V_ADD_I32_e32 12345, undef %1:vgpr_32, implicit-def $vcc, implicit $exec
309309 %2:sreg_64_xexec = COPY $vcc
310310 %3:vgpr_32, dead %4:sreg_64_xexec = V_ADDC_U32_e64 undef %5:vgpr_32, undef %6:vgpr_32, %2, implicit $exec
311 S_ENDPGM implicit %3
312
313 ...
311 S_ENDPGM 0, implicit %3
312
313 ...
7171 %10.sub1 = V_ADDC_U32_e32 %9.sub1, %2, implicit-def dead $vcc, implicit killed $vcc, implicit $exec
7272 FLAT_STORE_DWORD %9, %5, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.gep2)
7373 FLAT_STORE_DWORD %10, %6, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.gep4)
74 S_ENDPGM
74 S_ENDPGM 0
7575
7676 ...
161161 %12 = V_MOV_B32_e32 1065353216, implicit $exec
162162 %13 = V_ADD_F16_e64 0, killed %11, 0, %12, 0, 0, implicit $exec
163163 BUFFER_STORE_SHORT_OFFSET killed %13, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
164 S_ENDPGM
164 S_ENDPGM 0
165165
166166 ...
167167 ---
228228 %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $exec
229229 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
230230 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
231 S_ENDPGM
231 S_ENDPGM 0
232232
233233 ...
234234 ---
296296 %16 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $exec
297297 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
298298 BUFFER_STORE_DWORD_OFFSET killed %16, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
299 S_ENDPGM
299 S_ENDPGM 0
300300
301301 ...
302302 ---
369369 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
370370 BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
371371 BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
372 S_ENDPGM
372 S_ENDPGM 0
373373
374374 ...
375375 ---
433433 %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $exec
434434 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
435435 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
436 S_ENDPGM
436 S_ENDPGM 0
437437
438438 ...
439439 ---
503503 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
504504 BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
505505 BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
506 S_ENDPGM
506 S_ENDPGM 0
507507
508508 ...
509509 ---
570570 %15 = V_ADD_F32_e64 0, %12, 0, %13, 0, 0, implicit $exec
571571 BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
572572 BUFFER_STORE_DWORD_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
573 S_ENDPGM
573 S_ENDPGM 0
574574
575575 ...
576576 ---
637637 %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $exec
638638 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
639639 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
640 S_ENDPGM
640 S_ENDPGM 0
641641
642642 ...
643643 ---
703703 %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $exec
704704 BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
705705 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
706 S_ENDPGM
707
708 ...
706 S_ENDPGM 0
707
708 ...
1414 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
1515 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
1616 ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY killed $vcc
17 ; GCN: S_ENDPGM implicit [[COPY]]
17 ; GCN: S_ENDPGM 0, implicit [[COPY]]
1818 %0:sreg_32_xm0 = S_MOV_B32 12345
1919 %1:vgpr_32 = IMPLICIT_DEF
2020 %2:vgpr_32 = IMPLICIT_DEF
2121 %3:vgpr_32 = IMPLICIT_DEF
2222
2323 %4:vgpr_32, %5:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
24 S_ENDPGM implicit %5
24 S_ENDPGM 0, implicit %5
2525
2626 ...
2727 ---
3737 ; GCN: [[DEF1:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
3838 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], implicit $exec
3939 ; GCN: [[V_ADD_I32_e64_2:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_3:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF1]], implicit $exec
40 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_1]], implicit [[V_ADD_I32_e64_2]]
40 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_1]], implicit [[V_ADD_I32_e64_2]]
4141 %0:sreg_32_xm0 = S_MOV_B32 12345
4242 %1:vgpr_32 = IMPLICIT_DEF
4343 %2:vgpr_32 = IMPLICIT_DEF
4646
4747 %5:vgpr_32, %6:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
4848 %7:vgpr_32, %8:sreg_64_xexec = V_ADD_I32_e64 %0, %2, implicit $exec
49 S_ENDPGM implicit %6, implicit %7
49 S_ENDPGM 0, implicit %6, implicit %7
5050
5151 ...
5252 ---
6363 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
6464 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
6565 ; GCN: DBG_VALUE %5:sreg_64_xexec, $noreg
66 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
66 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
6767 %0:sreg_32_xm0 = S_MOV_B32 12345
6868 %1:vgpr_32 = IMPLICIT_DEF
6969 %2:vgpr_32 = IMPLICIT_DEF
7171
7272 %4:vgpr_32, %5:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
7373 DBG_VALUE %5, $noreg
74 S_ENDPGM implicit %4
74 S_ENDPGM 0, implicit %4
7575
7676 ...
7777
9292 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
9393 ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY killed $vcc
9494 ; GCN: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADDC_U32_e64 [[DEF1]], [[DEF2]], [[COPY]], implicit $exec
95 ; GCN: S_ENDPGM implicit [[V_ADDC_U32_e64_]]
95 ; GCN: S_ENDPGM 0, implicit [[V_ADDC_U32_e64_]]
9696 %0:sreg_32_xm0 = S_MOV_B32 12345
9797 %1:vgpr_32 = IMPLICIT_DEF
9898 %2:vgpr_32 = IMPLICIT_DEF
100100
101101 %4:vgpr_32, %5:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
102102 %6:vgpr_32, %7:sreg_64_xexec = V_ADDC_U32_e64 %2, %3, %5, implicit $exec
103 S_ENDPGM implicit %6
103 S_ENDPGM 0, implicit %6
104104
105105 ...
1111 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
1212 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
1313 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
14 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
15 %0:sreg_32_xm0 = S_MOV_B32 12345
16 %1:vgpr_32 = IMPLICIT_DEF
17 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
18 S_ENDPGM implicit %2
14 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
15 %0:sreg_32_xm0 = S_MOV_B32 12345
16 %1:vgpr_32 = IMPLICIT_DEF
17 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
18 S_ENDPGM 0, implicit %2
1919
2020 ...
2121
3030 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
3131 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
3232 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
33 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
33 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
3434 %0:vgpr_32 = IMPLICIT_DEF
3535 %1:sreg_32_xm0 = S_MOV_B32 12345
3636 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
37 S_ENDPGM implicit %2
37 S_ENDPGM 0, implicit %2
3838
3939 ...
4040 ---
4848 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
4949 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
5050 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
51 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
52 %0:sreg_32_xm0 = S_MOV_B32 12345
53 %1:vgpr_32 = IMPLICIT_DEF
54 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
55 S_ENDPGM implicit %2
51 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
52 %0:sreg_32_xm0 = S_MOV_B32 12345
53 %1:vgpr_32 = IMPLICIT_DEF
54 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
55 S_ENDPGM 0, implicit %2
5656
5757 ...
5858 ---
7070 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
7171 ; GCN: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
7272 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[DEF]], [[V_MOV_B32_e32_]], implicit $exec
73 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]]
73 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]]
7474 %0:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
7575 %1:sreg_32_xm0 = IMPLICIT_DEF
7676 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
77 S_ENDPGM implicit %2
77 S_ENDPGM 0, implicit %2
7878
7979 ...
8080
8989 ; GCN: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
9090 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
9191 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[V_MOV_B32_e32_]], [[DEF]], implicit $exec
92 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]]
92 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]]
9393 %0:sreg_32_xm0 = IMPLICIT_DEF
9494 %1:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
9595 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
96 S_ENDPGM implicit %2
96 S_ENDPGM 0, implicit %2
9797
9898 ...
9999
109109 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
110110 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
111111 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], implicit $exec
112 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc
112 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc
113113 $vcc = S_MOV_B64 -1
114114 %0:sreg_32_xm0 = S_MOV_B32 12345
115115 %1:vgpr_32 = IMPLICIT_DEF
116116 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
117 S_ENDPGM implicit %2, implicit $vcc
117 S_ENDPGM 0, implicit %2, implicit $vcc
118118
119119 ...
120120
133133 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], implicit $exec
134134 ; GCN: bb.1:
135135 ; GCN: liveins: $vcc
136 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc
136 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc
137137 bb.0:
138138 successors: %bb.1
139139 $vcc = S_MOV_B64 -1
143143
144144 bb.1:
145145 liveins: $vcc
146 S_ENDPGM implicit %2, implicit $vcc
146 S_ENDPGM 0, implicit %2, implicit $vcc
147147
148148 ...
149149 ---
160160 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], implicit $exec
161161 ; GCN: bb.1:
162162 ; GCN: liveins: $vcc_lo
163 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
163 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
164164 bb.0:
165165 successors: %bb.1
166166 $vcc = S_MOV_B64 -1
170170
171171 bb.1:
172172 liveins: $vcc_lo
173 S_ENDPGM implicit %2, implicit $vcc_lo
173 S_ENDPGM 0, implicit %2, implicit $vcc_lo
174174
175175 ...
176176 ---
190190 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
191191 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
192192 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], implicit $exec
193 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
193 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
194194 bb.0:
195195 successors: %bb.1
196196 $vcc = S_MOV_B64 -1
200200 %0:sreg_32_xm0 = S_MOV_B32 12345
201201 %1:vgpr_32 = IMPLICIT_DEF
202202 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
203 S_ENDPGM implicit %2, implicit $vcc_lo
203 S_ENDPGM 0, implicit %2, implicit $vcc_lo
204204
205205 ...
206206 ---
221221 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], implicit $exec
222222 ; GCN: bb.2:
223223 ; GCN: liveins: $vcc_hi
224 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc_hi
224 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_hi
225225 bb.0:
226226 successors: %bb.1
227227 $vcc_hi = S_MOV_B32 -1
235235 bb.2:
236236 liveins: $vcc_hi
237237
238 S_ENDPGM implicit %2, implicit $vcc_hi
238 S_ENDPGM 0, implicit %2, implicit $vcc_hi
239239
240240 ...
241241
250250 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
251251 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
252252 ; GCN: [[V_SUBREV_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
253 ; GCN: S_ENDPGM implicit [[V_SUBREV_I32_e32_]]
253 ; GCN: S_ENDPGM 0, implicit [[V_SUBREV_I32_e32_]]
254254 %0:sreg_32_xm0 = S_MOV_B32 12345
255255 %1:vgpr_32 = IMPLICIT_DEF
256256 %2:vgpr_32, %3:sreg_64 = V_SUB_I32_e64 %0, %1, implicit $exec
257 S_ENDPGM implicit %2
257 S_ENDPGM 0, implicit %2
258258
259259 ...
260260
269269 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
270270 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
271271 ; GCN: [[V_SUB_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
272 ; GCN: S_ENDPGM implicit [[V_SUB_I32_e32_]]
272 ; GCN: S_ENDPGM 0, implicit [[V_SUB_I32_e32_]]
273273 %0:vgpr_32 = IMPLICIT_DEF
274274 %1:sreg_32_xm0 = S_MOV_B32 12345
275275 %2:vgpr_32, %3:sreg_64 = V_SUB_I32_e64 %0, %1, implicit $exec
276 S_ENDPGM implicit %2
276 S_ENDPGM 0, implicit %2
277277
278278 ...
279279
288288 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
289289 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
290290 ; GCN: [[V_SUB_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
291 ; GCN: S_ENDPGM implicit [[V_SUB_I32_e32_]]
291 ; GCN: S_ENDPGM 0, implicit [[V_SUB_I32_e32_]]
292292 %0:sreg_32_xm0 = S_MOV_B32 12345
293293 %1:vgpr_32 = IMPLICIT_DEF
294294 %2:vgpr_32, %3:sreg_64 = V_SUBREV_I32_e64 %0, %1, implicit $exec
295 S_ENDPGM implicit %2
295 S_ENDPGM 0, implicit %2
296296
297297 ...
298298
307307 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
308308 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
309309 ; GCN: [[V_SUBREV_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
310 ; GCN: S_ENDPGM implicit [[V_SUBREV_I32_e32_]]
310 ; GCN: S_ENDPGM 0, implicit [[V_SUBREV_I32_e32_]]
311311 %0:vgpr_32 = IMPLICIT_DEF
312312 %1:sreg_32_xm0 = S_MOV_B32 12345
313313 %2:vgpr_32, %3:sreg_64 = V_SUBREV_I32_e64 %0, %1, implicit $exec
314 S_ENDPGM implicit %2
314 S_ENDPGM 0, implicit %2
315315
316316 ...
317317
330330 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
331331 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
332332 ; GCN: bb.1:
333 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
333 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
334334 bb.0:
335335 successors: %bb.1
336336
371371 S_NOP 0
372372
373373 bb.1:
374 S_ENDPGM implicit %2
374 S_ENDPGM 0, implicit %2
375375
376376 ...
377377
391391 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
392392 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
393393 ; GCN: bb.1:
394 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
394 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
395395 bb.0:
396396 successors: %bb.1
397397
403403 S_NOP 0
404404
405405 bb.1:
406 S_ENDPGM implicit %2
406 S_ENDPGM 0, implicit %2
407407
408408 ...
409409 ---
448448 ; GCN: DBG_VALUE $noreg, 0
449449 ; GCN: DBG_VALUE $noreg, 0
450450 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
451 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
452 %0:sreg_32_xm0 = S_MOV_B32 12345
453 %1:vgpr_32 = IMPLICIT_DEF
454 DBG_VALUE $noreg, 0
455 DBG_VALUE $noreg, 0
456 DBG_VALUE $noreg, 0
457 DBG_VALUE $noreg, 0
458 DBG_VALUE $noreg, 0
459 DBG_VALUE $noreg, 0
460 DBG_VALUE $noreg, 0
461 DBG_VALUE $noreg, 0
462 DBG_VALUE $noreg, 0
463 DBG_VALUE $noreg, 0
464 DBG_VALUE $noreg, 0
465 DBG_VALUE $noreg, 0
466 DBG_VALUE $noreg, 0
467 DBG_VALUE $noreg, 0
468 DBG_VALUE $noreg, 0
469 DBG_VALUE $noreg, 0
470 DBG_VALUE $noreg, 0
471 DBG_VALUE $noreg, 0
472 DBG_VALUE $noreg, 0
473 DBG_VALUE $noreg, 0
474 DBG_VALUE $noreg, 0
475 DBG_VALUE $noreg, 0
476 DBG_VALUE $noreg, 0
477 DBG_VALUE $noreg, 0
478 DBG_VALUE $noreg, 0
479 DBG_VALUE $noreg, 0
480 DBG_VALUE $noreg, 0
481 DBG_VALUE $noreg, 0
482 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
483 S_ENDPGM implicit %2
451 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
452 %0:sreg_32_xm0 = S_MOV_B32 12345
453 %1:vgpr_32 = IMPLICIT_DEF
454 DBG_VALUE $noreg, 0
455 DBG_VALUE $noreg, 0
456 DBG_VALUE $noreg, 0
457 DBG_VALUE $noreg, 0
458 DBG_VALUE $noreg, 0
459 DBG_VALUE $noreg, 0
460 DBG_VALUE $noreg, 0
461 DBG_VALUE $noreg, 0
462 DBG_VALUE $noreg, 0
463 DBG_VALUE $noreg, 0
464 DBG_VALUE $noreg, 0
465 DBG_VALUE $noreg, 0
466 DBG_VALUE $noreg, 0
467 DBG_VALUE $noreg, 0
468 DBG_VALUE $noreg, 0
469 DBG_VALUE $noreg, 0
470 DBG_VALUE $noreg, 0
471 DBG_VALUE $noreg, 0
472 DBG_VALUE $noreg, 0
473 DBG_VALUE $noreg, 0
474 DBG_VALUE $noreg, 0
475 DBG_VALUE $noreg, 0
476 DBG_VALUE $noreg, 0
477 DBG_VALUE $noreg, 0
478 DBG_VALUE $noreg, 0
479 DBG_VALUE $noreg, 0
480 DBG_VALUE $noreg, 0
481 DBG_VALUE $noreg, 0
482 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
483 S_ENDPGM 0, implicit %2
484484
485485 ...
486486 ---
525525 ; GCN: DBG_VALUE $noreg, 0
526526 ; GCN: DBG_VALUE $noreg, 0
527527 ; GCN: DBG_VALUE $noreg, 0
528 ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
528 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
529529 %0:sreg_32_xm0 = S_MOV_B32 12345
530530 %1:vgpr_32 = IMPLICIT_DEF
531531 S_NOP 0
586586 DBG_VALUE $noreg, 0
587587 DBG_VALUE $noreg, 0
588588 $vcc = S_MOV_B64 0
589 S_ENDPGM implicit %2
590
591 ...
589 S_ENDPGM 0, implicit %2
590
591 ...
6666 %24 = V_MAC_F32_e64 0, killed %19, 0, killed %21, 0, %23, 1, 0, implicit $exec
6767 %26 = COPY %29
6868 BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
69 S_ENDPGM
69 S_ENDPGM 0
7070
7171 ...
7272 ---
137137 %24 = V_MAC_F32_e64 0, killed %19, 0, killed %21, 0, %23, 0, 2, implicit $exec
138138 %26 = COPY %29
139139 BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
140 S_ENDPGM
140 S_ENDPGM 0
141141
142142 ...
143143 ---
208208 %24 = V_MAD_F32 0, killed %19, 0, killed %21, 0, %23, 1, 0, implicit $exec
209209 %26 = COPY %29
210210 BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
211 S_ENDPGM
211 S_ENDPGM 0
212212
213213 ...
214214 ---
279279 %24 = V_MAD_F32 0, killed %19, 0, killed %21, 0, %23, 0, 1, implicit $exec
280280 %26 = COPY %29
281281 BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
282 S_ENDPGM
283
284 ...
282 S_ENDPGM 0
283
284 ...
33 # implicit use
44
55 # CHECK: %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
6 # CHECK-NEXT: S_ENDPGM implicit %0
6 # CHECK-NEXT: S_ENDPGM 0, implicit %0
77 name: fold_imm_implicit_operand
88 body: |
99 bb.0:
1010 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
11 S_ENDPGM implicit %0
11 S_ENDPGM 0, implicit %0
1212
1313 ...
3434 %4 = V_AND_B32_e64 killed %2, killed %3, implicit $exec
3535 %5 = IMPLICIT_DEF
3636 BUFFER_STORE_DWORD_OFFSET killed %4, killed %5, 0, 0, 0, 0, 0, implicit $exec
37 S_ENDPGM
37 S_ENDPGM 0
3838
3939 ...
244244 GLOBAL_STORE_DWORDX2 %11, %78, 0, 0, 0, implicit $exec :: (volatile store 4 into `i32 addrspace(1)* undef`, addrspace 1)
245245 GLOBAL_ATOMIC_CMPSWAP_X2 %11, %80, 16, 0, implicit $exec :: (volatile load store seq_cst 4, addrspace 1)
246246
247 S_ENDPGM
247 S_ENDPGM 0
248248 ...
1313
1414 BUFFER_STORE_DWORDX4_OFFSET_exact killed $vgpr7_vgpr8_vgpr9_vgpr10, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 96, 0, 0, 0, implicit $exec
1515 $vgpr7 = V_INTERP_P1_F32 $vgpr0, 0, 0, implicit $m0, implicit $exec
16 S_ENDPGM
16 S_ENDPGM 0
1717
1818 ...
1717 bb.0:
1818 FLAT_STORE_DWORDX4 $vgpr49_vgpr50, $vgpr26_vgpr27_vgpr28_vgpr29, 0, 0, 0, implicit $exec, implicit $flat_scr
1919 INLINEASM &"v_mad_u64_u32 $0, $1, $2, $3, $4", 0, 2621450, def $vgpr26_vgpr27, 2818058, def dead $sgpr14_sgpr15, 589833, $sgpr12, 327689, killed $vgpr51, 2621449, $vgpr46_vgpr47
20 S_ENDPGM
20 S_ENDPGM 0
2121 ...
2222
2323
2626 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $m0, implicit $exec
2727 renamable $sgpr0 = S_MOV_B32 0
2828
29 S_ENDPGM
29 S_ENDPGM 0
3030
3131 ...
8080 $vgpr5 = IMPLICIT_DEF
8181 $vgpr6 = IMPLICIT_DEF
8282 S_SENDMSG 3, implicit $exec, implicit $m0
83 S_ENDPGM
83 S_ENDPGM 0
8484 ...
8585
8686 # GCN-LABEL: name: hazard-lookahead-dbg-value
101101 DBG_VALUE 5
102102 DBG_VALUE 6
103103 S_SENDMSG 3, implicit $exec, implicit $m0
104 S_ENDPGM
104 S_ENDPGM 0
105105 ...
106106
107107 # GCN-LABEL: name: hazard-lookahead-dbg-label
122122 DBG_LABEL 5
123123 DBG_LABEL 6
124124 S_SENDMSG 3, implicit $exec, implicit $m0
125 S_ENDPGM
125 S_ENDPGM 0
126126 ...
1616 $sgpr0_sgpr1 = S_MOV_B64 -1
1717 $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
1818 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
19 S_ENDPGM
19 S_ENDPGM 0
2020 ...
2121 ---
2222 # GCN-LABEL: name: and_execz_imm_vccz
3333 bb.2:
3434 $vcc = S_AND_B64 $exec, -1, implicit-def dead $scc
3535 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
36 S_ENDPGM
36 S_ENDPGM 0
3737 ...
3838 ---
3939 # GCN-LABEL: name: and_execnz_imm_vccnz
5050 bb.2:
5151 $vcc = S_AND_B64 $exec, -1, implicit-def dead $scc
5252 S_CBRANCH_VCCNZ %bb.1, implicit killed $vcc
53 S_ENDPGM
53 S_ENDPGM 0
5454 ...
5555 ---
5656 # GCN-LABEL: name: and_execz_imm_vccz_live_scc
6767 bb.2:
6868 $vcc = S_AND_B64 $exec, -1, implicit-def $scc
6969 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
70 S_ENDPGM
70 S_ENDPGM 0
7171 ...
7272 ---
7373 # GCN-LABEL: name: and_execz_mov_vccz_live_scc
8686 $sgpr0_sgpr1 = S_MOV_B64 -1
8787 $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def $scc
8888 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
89 S_ENDPGM
89 S_ENDPGM 0
9090 ...
9191 ---
9292 # GCN-LABEL: name: and_execz_mov_vccz_live_sreg
104104 $sgpr0_sgpr1 = S_MOV_B64 -1
105105 $vcc = S_AND_B64 $exec, $sgpr0_sgpr1, implicit-def dead $scc
106106 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
107 S_ENDPGM
107 S_ENDPGM 0
108108 ...
109109 ---
110110 # GCN-LABEL: name: and_execz_mov_vccz_live_sreg_commute
122122 $sgpr0_sgpr1 = S_MOV_B64 -1
123123 $vcc = S_AND_B64 $sgpr0_sgpr1, $exec, implicit-def dead $scc
124124 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
125 S_ENDPGM
125 S_ENDPGM 0
126126 ...
127127 ---
128128 # GCN-LABEL: name: and_execz_mov_vccz_live_scc_commute
141141 $sgpr0_sgpr1 = S_MOV_B64 -1
142142 $vcc = S_AND_B64 killed $sgpr0_sgpr1, $exec, implicit-def $scc
143143 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
144 S_ENDPGM
144 S_ENDPGM 0
145145 ...
146146 ---
147147 # GCN-LABEL: name: and_execz_mov_vccz_commute
160160 $sgpr0_sgpr1 = S_MOV_B64 -1
161161 $vcc = S_AND_B64 killed $sgpr0_sgpr1, $exec, implicit-def dead $scc
162162 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
163 S_ENDPGM
163 S_ENDPGM 0
164164 ...
165165 ---
166166 # GCN-LABEL: name: and_execz_mov_exec_vccz
167167 # GCN: $exec = S_MOV_B64 -1
168 # GCN-NEXT: S_ENDPGM
168 # GCN-NEXT: S_ENDPGM 0
169169 name: and_execz_mov_exec_vccz
170170 body: |
171171 bb.0:
178178 $exec = S_MOV_B64 -1
179179 $vcc = S_AND_B64 $exec, $exec, implicit-def dead $scc
180180 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
181 S_ENDPGM
181 S_ENDPGM 0
182182 ...
183183 ---
184184 # GCN-LABEL: name: and_execz_mov_exec_vccnz
196196 $exec = S_MOV_B64 -1
197197 $vcc = S_AND_B64 $exec, $exec, implicit-def dead $scc
198198 S_CBRANCH_VCCNZ %bb.1, implicit killed $vcc
199 S_ENDPGM
199 S_ENDPGM 0
200200 ...
201201 ---
202202 # GCN-LABEL: name: and_execz_mov_vccz_reads_sreg_early
216216 $sgpr2 = S_MOV_B32 $sgpr1
217217 $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
218218 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
219 S_ENDPGM
219 S_ENDPGM 0
220220 ...
221221 ---
222222 # GCN-LABEL: name: and_execz_mov_vccz_reads_sreg_late
236236 $vcc = S_AND_B64 $exec, $sgpr0_sgpr1, implicit-def dead $scc
237237 $sgpr2 = S_MOV_B32 $sgpr1
238238 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
239 S_ENDPGM
239 S_ENDPGM 0
240240 ...
241241 # GCN-LABEL: name: and_execz_mov_vccz_reads_writes_sreg_early
242242 # GCN: $sgpr0_sgpr1 = S_MOV_B64 -1
256256 $sgpr1 = S_MOV_B32 $sgpr0
257257 $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
258258 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
259 S_ENDPGM
259 S_ENDPGM 0
260260 ...
261261 ---
262262 # GCN-LABEL: name: and_execz_mov_vccz_reads_cond
276276 $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
277277 $sgpr2 = S_MOV_B32 $vcc_lo
278278 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
279 S_ENDPGM
279 S_ENDPGM 0
280280 ...
281281 ---
282282 # GCN-LABEL: name: and_execz_mov_vccz_modifies_sreg
297297 $sgpr0 = S_MOV_B32 0
298298 $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
299299 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
300 S_ENDPGM
300 S_ENDPGM 0
301301 ...
302302 ---
303303 # GCN-LABEL: name: and_execz_imm_vccz_liveout_scc
304304 # GCN: $vcc = S_AND_B64 $exec, -1, implicit-def $scc
305305 # GCN-NEXT: S_CBRANCH_EXECZ %bb.1, implicit $exec
306 # GCN-NEXT S_ENDPGM implicit $scc
306 # GCN-NEXT S_ENDPGM 0, implicit $scc
307307 name: and_execz_imm_vccz_liveout_scc
308308 body: |
309309 bb.0:
315315 bb.2:
316316 $vcc = S_AND_B64 $exec, -1, implicit-def $scc
317317 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
318 S_ENDPGM implicit $scc
319 ...
318 S_ENDPGM 0, implicit $scc
319 ...
1717
1818 # CHECK: bb.3:
1919 # CHECK-NEXT: EXP_DONE
20 # CHECK: S_ENDPGM
20 # CHECK: S_ENDPGM 0
2121
2222 # CHECK: bb.2:
23 # CHECK: S_ENDPGM
23 # CHECK: S_ENDPGM 0
2424
2525 name: kill_uncond_branch
2626
3636 S_BRANCH %bb.2
3737
3838 bb.2:
39 S_ENDPGM
39 S_ENDPGM 0
9494 bb.3:
9595 $vgpr4, $vcc = V_DIV_SCALE_F32 $vgpr1, $vgpr1, $vgpr3, implicit $exec
9696 $vgpr0 = V_DIV_FMAS_F32 0, $vgpr1, 0, $vgpr2, 0, $vgpr3, 0, 0, implicit $vcc, implicit $exec
97 S_ENDPGM
97 S_ENDPGM 0
9898
9999 ...
100100
145145 bb.3:
146146 S_SETREG_B32 $sgpr0, 0
147147 $sgpr1 = S_GETREG_B32 1
148 S_ENDPGM
148 S_ENDPGM 0
149149 ...
150150
151151 ...
184184 bb.2:
185185 S_SETREG_B32 $sgpr0, 1
186186 S_SETREG_B32 $sgpr1, 0
187 S_ENDPGM
187 S_ENDPGM 0
188188 ...
189189
190190 ...
256256 $vgpr3 = V_MOV_B32_e32 0, implicit $exec
257257 FLAT_ATOMIC_FCMPSWAP_X2 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5, 0, 0, implicit $exec, implicit $flat_scr
258258 $vgpr3 = V_MOV_B32_e32 0, implicit $exec
259 S_ENDPGM
259 S_ENDPGM 0
260260
261261 ...
262262
318318 bb.3:
319319 $vgpr0,implicit $vcc = V_ADD_I32_e32 $vgpr1, $vgpr2, implicit $vcc, implicit $exec
320320 $vgpr4 = V_WRITELANE_B32 $sgpr4, $vcc_lo, $vgpr4
321 S_ENDPGM
321 S_ENDPGM 0
322322
323323 ...
324324
347347 bb.1:
348348 S_SETREG_B32 $sgpr0, 0
349349 S_RFE_B64 $sgpr2_sgpr3
350 S_ENDPGM
350 S_ENDPGM 0
351351
352352 ...
353353
376376 bb.1:
377377 $sgpr0 = S_MOV_FED_B32 $sgpr0
378378 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec
379 S_ENDPGM
379 S_ENDPGM 0
380380
381381 ...
382382
426426 bb.3:
427427 $m0 = S_MOV_B32 0
428428 $sgpr0_sgpr1 = S_MOVRELD_B64 $sgpr0_sgpr1, implicit $m0
429 S_ENDPGM
429 S_ENDPGM 0
430430 ...
431431
432432 ...
475475 bb.3:
476476 $m0 = S_MOV_B32 0
477477 $vgpr0 = V_INTERP_MOV_F32 0, 0, 0, implicit $m0, implicit $exec
478 S_ENDPGM
478 S_ENDPGM 0
479479 ...
480480
481481 ...
509509 bb.1:
510510 implicit $exec, implicit $vcc = V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit $exec
511511 $vgpr3 = V_MOV_B32_dpp $vgpr3, $vgpr0, 0, 15, 15, 0, implicit $exec
512 S_ENDPGM
512 S_ENDPGM 0
513513 ...
514514 ---
515515 name: mov_fed_hazard_crash_on_dbg_value
556556 $sgpr8 = S_MOV_B32 $sgpr4, implicit killed $sgpr4_sgpr5
557557 $vgpr0 = V_MOV_B32_e32 killed $sgpr8, implicit $exec
558558 BUFFER_STORE_DWORD_OFFSET $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr9, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.A.addr)
559 S_ENDPGM
560
561 ...
559 S_ENDPGM 0
560
561 ...
8080 $sgpr3 = S_MOV_B32 61440
8181 $sgpr2 = S_MOV_B32 -1
8282 BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.out)
83 S_ENDPGM
83 S_ENDPGM 0
8484
8585 ...
109109 liveins: $sgpr2_sgpr3
110110
111111 $exec = S_OR_B64 $exec, killed $sgpr2_sgpr3, implicit-def $scc
112 S_ENDPGM
112 S_ENDPGM 0
113113
114114 ...
115115
1414 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
1515 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
1616 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
17 S_ENDPGM
17 S_ENDPGM 0
1818
1919 ...
2020 ---
3030 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
3131 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
3232 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile store syncscope("agent") seq_cst 4 into `i32 addrspace(42)* undef`)
33 S_ENDPGM
33 S_ENDPGM 0
3434
3535 ...
3636 ---
4747 $vgpr1 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $exec
4848 $vgpr2 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
4949 FLAT_ATOMIC_CMPSWAP killed renamable $vgpr2_vgpr3, killed renamable $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store syncscope("workgroup") seq_cst seq_cst 4 on `i32 addrspace(42)* undef`)
50 S_ENDPGM
50 S_ENDPGM 0
5151
5252 ...
5353 ---
6363 $vgpr1 = V_MOV_B32_e32 killed $sgpr3, implicit $exec, implicit $sgpr2_sgpr3, implicit $exec
6464 $vgpr2 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
6565 FLAT_ATOMIC_SWAP killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store syncscope("wavefront") seq_cst 4 on `i32 addrspace(42)* undef`)
66 S_ENDPGM
66 S_ENDPGM 0
6767
6868 ...
2020 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
2121 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
2222 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
23 S_ENDPGM
23 S_ENDPGM 0
2424
2525 ...
2626 ---
4444 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
4545 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
4646 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
47 S_ENDPGM
47 S_ENDPGM 0
4848
4949 ...
5050 ---
6868 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
6969 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
7070 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
71 S_ENDPGM
71 S_ENDPGM 0
7272
7373 ...
7474 ---
9292 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
9393 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
9494 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
95 S_ENDPGM
95 S_ENDPGM 0
9696
9797 ...
9898 ---
116116 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
117117 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
118118 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
119 S_ENDPGM
119 S_ENDPGM 0
120120
121121 ...
122122 ---
140140 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
141141 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
142142 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
143 S_ENDPGM
143 S_ENDPGM 0
144144
145145 ...
146146 ---
164164 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
165165 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
166166 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
167 S_ENDPGM
167 S_ENDPGM 0
168168
169169 ...
170170 ---
188188 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
189189 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
190190 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
191 S_ENDPGM
191 S_ENDPGM 0
192192
193193 ...
194194 ---
212212 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
213213 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
214214 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
215 S_ENDPGM
215 S_ENDPGM 0
216216
217217 ...
218218 ---
236236 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
237237 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
238238 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
239 S_ENDPGM
239 S_ENDPGM 0
240240
241241 ...
242242 ---
260260 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
261261 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
262262 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
263 S_ENDPGM
263 S_ENDPGM 0
264264
265265 ...
266266 ---
284284 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
285285 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
286286 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
287 S_ENDPGM
287 S_ENDPGM 0
288288
289289 ...
290290 ---
308308 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
309309 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
310310 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
311 S_ENDPGM
311 S_ENDPGM 0
312312
313313 ...
314314 ---
332332 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
333333 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
334334 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
335 S_ENDPGM
335 S_ENDPGM 0
336336
337337 ...
338338 ---
356356 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
357357 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
358358 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
359 S_ENDPGM
359 S_ENDPGM 0
360360
361361 ...
362362 ---
380380 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
381381 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
382382 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
383 S_ENDPGM
383 S_ENDPGM 0
384384
385385 ...
386386 ---
404404 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
405405 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
406406 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
407 S_ENDPGM
407 S_ENDPGM 0
408408
409409 ...
410410 ---
428428 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
429429 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
430430 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
431 S_ENDPGM
431 S_ENDPGM 0
432432
433433 ...
434434 ---
452452 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
453453 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
454454 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
455 S_ENDPGM
455 S_ENDPGM 0
456456
457457 ...
458458 ---
476476 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
477477 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
478478 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
479 S_ENDPGM
479 S_ENDPGM 0
480480
481481 ...
482482 ---
487487 # GCN-NOT: S_WAITCNT
488488 # GCN: DS_WRITE_B32
489489 # GCN-NOT: S_WAITCNT
490 # GCN: S_ENDPGM
490 # GCN: S_ENDPGM 0
491491
492492 name: store_singlethread_unordered
493493 body: |
498498 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
499499 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
500500 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") unordered 4 into `i32 addrspace(3)* undef`)
501 S_ENDPGM
501 S_ENDPGM 0
502502
503503 ...
504504 ---
509509 # GCN-NOT: S_WAITCNT
510510 # GCN: DS_WRITE_B32
511511 # GCN-NOT: S_WAITCNT
512 # GCN: S_ENDPGM
512 # GCN: S_ENDPGM 0
513513
514514 name: store_singlethread_monotonic
515515 body: |
520520 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
521521 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
522522 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") monotonic 4 into `i32 addrspace(3)* undef`)
523 S_ENDPGM
523 S_ENDPGM 0
524524
525525 ...
526526 ---
531531 # GCN-NOT: S_WAITCNT
532532 # GCN: DS_WRITE_B32
533533 # GCN-NOT: S_WAITCNT
534 # GCN: S_ENDPGM
534 # GCN: S_ENDPGM 0
535535
536536 name: store_singlethread_release
537537 body: |
542542 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
543543 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
544544 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") release 4 into `i32 addrspace(3)* undef`)
545 S_ENDPGM
545 S_ENDPGM 0
546546
547547 ...
548548 ---
553553 # GCN-NOT: S_WAITCNT
554554 # GCN: DS_WRITE_B32
555555 # GCN-NOT: S_WAITCNT
556 # GCN: S_ENDPGM
556 # GCN: S_ENDPGM 0
557557
558558 name: store_singlethread_seq_cst
559559 body: |
564564 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
565565 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
566566 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") seq_cst 4 into `i32 addrspace(3)* undef`)
567 S_ENDPGM
567 S_ENDPGM 0
568568
569569 ...
570570 ---
575575 # GCN-NOT: S_WAITCNT
576576 # GCN: DS_WRITE_B32
577577 # GCN-NOT: S_WAITCNT
578 # GCN: S_ENDPGM
578 # GCN: S_ENDPGM 0
579579
580580 name: store_wavefront_unordered
581581 body: |
586586 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
587587 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
588588 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") unordered 4 into `i32 addrspace(3)* undef`)
589 S_ENDPGM
589 S_ENDPGM 0
590590
591591 ...
592592 ---
597597 # GCN-NOT: S_WAITCNT
598598 # GCN: DS_WRITE_B32
599599 # GCN-NOT: S_WAITCNT
600 # GCN: S_ENDPGM
600 # GCN: S_ENDPGM 0
601601
602602 name: store_wavefront_monotonic
603603 body: |
608608 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
609609 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
610610 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") monotonic 4 into `i32 addrspace(3)* undef`)
611 S_ENDPGM
611 S_ENDPGM 0
612612
613613 ...
614614 ---
619619 # GCN-NOT: S_WAITCNT
620620 # GCN: DS_WRITE_B32
621621 # GCN-NOT: S_WAITCNT
622 # GCN: S_ENDPGM
622 # GCN: S_ENDPGM 0
623623
624624 name: store_wavefront_release
625625 body: |
630630 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
631631 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
632632 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") release 4 into `i32 addrspace(3)* undef`)
633 S_ENDPGM
633 S_ENDPGM 0
634634
635635 ...
636636 ---
641641 # GCN-NOT: S_WAITCNT
642642 # GCN: DS_WRITE_B32
643643 # GCN-NOT: S_WAITCNT
644 # GCN: S_ENDPGM
644 # GCN: S_ENDPGM 0
645645
646646 name: store_wavefront_seq_cst
647647 body: |
652652 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
653653 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
654654 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") seq_cst 4 into `i32 addrspace(3)* undef`)
655 S_ENDPGM
655 S_ENDPGM 0
656656
657657 ...
658658 ---
663663 # GCN-NOT: S_WAITCNT
664664 # GCN: DS_WRITE_B32
665665 # GCN-NOT: S_WAITCNT
666 # GCN: S_ENDPGM
666 # GCN: S_ENDPGM 0
667667
668668 name: store_workgroup_unordered
669669 body: |
674674 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
675675 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
676676 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") unordered 4 into `i32 addrspace(3)* undef`)
677 S_ENDPGM
677 S_ENDPGM 0
678678
679679 ...
680680 ---
685685 # GCN-NOT: S_WAITCNT
686686 # GCN: DS_WRITE_B32
687687 # GCN-NOT: S_WAITCNT
688 # GCN: S_ENDPGM
688 # GCN: S_ENDPGM 0
689689
690690 name: store_workgroup_monotonic
691691 body: |
696696 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
697697 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
698698 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") monotonic 4 into `i32 addrspace(3)* undef`)
699 S_ENDPGM
699 S_ENDPGM 0
700700
701701 ...
702702 ---
707707 # GCN-NOT: S_WAITCNT
708708 # GCN: DS_WRITE_B32
709709 # GCN-NOT: S_WAITCNT
710 # GCN: S_ENDPGM
710 # GCN: S_ENDPGM 0
711711
712712 name: store_workgroup_release
713713 body: |
718718 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
719719 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
720720 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") release 4 into `i32 addrspace(3)* undef`)
721 S_ENDPGM
721 S_ENDPGM 0
722722
723723 ...
724724 ---
729729 # GCN-NOT: S_WAITCNT
730730 # GCN: DS_WRITE_B32
731731 # GCN-NOT: S_WAITCNT
732 # GCN: S_ENDPGM
732 # GCN: S_ENDPGM 0
733733
734734 name: store_workgroup_seq_cst
735735 body: |
740740 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
741741 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
742742 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") seq_cst 4 into `i32 addrspace(3)* undef`)
743 S_ENDPGM
743 S_ENDPGM 0
744744
745745 ...
746746 ---
751751 # GCN-NOT: S_WAITCNT
752752 # GCN: DS_WRITE_B32
753753 # GCN-NOT: S_WAITCNT
754 # GCN: S_ENDPGM
754 # GCN: S_ENDPGM 0
755755
756756 name: store_agent_unordered
757757 body: |
762762 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
763763 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
764764 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent") unordered 4 into `i32 addrspace(3)* undef`)
765 S_ENDPGM
765 S_ENDPGM 0
766766
767767 ...
768768 ---
773773 # GCN-NOT: S_WAITCNT
774774 # GCN: DS_WRITE_B32
775775 # GCN-NOT: S_WAITCNT
776 # GCN: S_ENDPGM
776 # GCN: S_ENDPGM 0
777777
778778 name: store_agent_monotonic
779779 body: |
784784 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
785785 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
786786 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent") monotonic 4 into `i32 addrspace(3)* undef`)
787 S_ENDPGM
787 S_ENDPGM 0
788788
789789 ...
790790 ---
795795 # GCN-NOT: S_WAITCNT
796796 # GCN: DS_WRITE_B32
797797 # GCN-NOT: S_WAITCNT
798 # GCN: S_ENDPGM
798 # GCN: S_ENDPGM 0
799799
800800 name: store_agent_release
801801 body: |
806806 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
807807 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
808808 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent") release 4 into `i32 addrspace(3)* undef`)
809 S_ENDPGM
809 S_ENDPGM 0
810810
811811 ...
812812 ---
817817 # GCN-NOT: S_WAITCNT
818818 # GCN: DS_WRITE_B32
819819 # GCN-NOT: S_WAITCNT
820 # GCN: S_ENDPGM
820 # GCN: S_ENDPGM 0
821821
822822 name: store_agent_seq_cst
823823 body: |
828828 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
829829 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
830830 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent") seq_cst 4 into `i32 addrspace(3)* undef`)
831 S_ENDPGM
831 S_ENDPGM 0
832832
833833 ...
834834 ---
839839 # GCN-NOT: S_WAITCNT
840840 # GCN: DS_WRITE_B32
841841 # GCN-NOT: S_WAITCNT
842 # GCN: S_ENDPGM
842 # GCN: S_ENDPGM 0
843843
844844 name: store_system_unordered
845845 body: |
850850 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
851851 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
852852 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store unordered 4 into `i32 addrspace(3)* undef`)
853 S_ENDPGM
853 S_ENDPGM 0
854854
855855 ...
856856 ---
861861 # GCN-NOT: S_WAITCNT
862862 # GCN: DS_WRITE_B32
863863 # GCN-NOT: S_WAITCNT
864 # GCN: S_ENDPGM
864 # GCN: S_ENDPGM 0
865865
866866 name: store_system_monotonic
867867 body: |
872872 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
873873 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
874874 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store monotonic 4 into `i32 addrspace(3)* undef`)
875 S_ENDPGM
875 S_ENDPGM 0
876876
877877 ...
878878 ---
883883 # GCN-NOT: S_WAITCNT
884884 # GCN: DS_WRITE_B32
885885 # GCN-NOT: S_WAITCNT
886 # GCN: S_ENDPGM
886 # GCN: S_ENDPGM 0
887887
888888 name: store_system_release
889889 body: |
894894 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
895895 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
896896 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store release 4 into `i32 addrspace(3)* undef`)
897 S_ENDPGM
897 S_ENDPGM 0
898898
899899 ...
900900 ---
905905 # GCN-NOT: S_WAITCNT
906906 # GCN: DS_WRITE_B32
907907 # GCN-NOT: S_WAITCNT
908 # GCN: S_ENDPGM
908 # GCN: S_ENDPGM 0
909909
910910 name: store_system_seq_cst
911911 body: |
916916 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
917917 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
918918 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store seq_cst 4 into `i32 addrspace(3)* undef`)
919 S_ENDPGM
919 S_ENDPGM 0
920920
921921 ...
922922 ---
927927 # GCN-NOT: S_WAITCNT
928928 # GCN: DS_WRXCHG_RTN_B32
929929 # GCN-NOT: S_WAITCNT
930 # GCN: S_ENDPGM
930 # GCN: S_ENDPGM 0
931931
932932 name: atomicrmw_singlethread_unordered
933933 body: |
938938 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
939939 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
940940 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") unordered 4 into `i32 addrspace(3)* undef`)
941 S_ENDPGM
941 S_ENDPGM 0
942942
943943 ...
944944 ---
949949 # GCN-NOT: S_WAITCNT
950950 # GCN: DS_WRXCHG_RTN_B32
951951 # GCN-NOT: S_WAITCNT
952 # GCN: S_ENDPGM
952 # GCN: S_ENDPGM 0
953953
954954 name: atomicrmw_singlethread_monotonic
955955 body: |
960960 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
961961 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
962962 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") monotonic 4 into `i32 addrspace(3)* undef`)
963 S_ENDPGM
963 S_ENDPGM 0
964964
965965 ...
966966 ---
971971 # GCN-NOT: S_WAITCNT
972972 # GCN: DS_WRXCHG_RTN_B32
973973 # GCN-NOT: S_WAITCNT
974 # GCN: S_ENDPGM
974 # GCN: S_ENDPGM 0
975975
976976 name: atomicrmw_singlethread_acquire
977977 body: |
982982 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
983983 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
984984 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") acquire 4 into `i32 addrspace(3)* undef`)
985 S_ENDPGM
985 S_ENDPGM 0
986986
987987 ...
988988 ---
993993 # GCN-NOT: S_WAITCNT
994994 # GCN: DS_WRXCHG_RTN_B32
995995 # GCN-NOT: S_WAITCNT
996 # GCN: S_ENDPGM
996 # GCN: S_ENDPGM 0
997997
998998 name: atomicrmw_singlethread_release
999999 body: |
10041004 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
10051005 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
10061006 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") release 4 into `i32 addrspace(3)* undef`)
1007 S_ENDPGM
1007 S_ENDPGM 0
10081008
10091009 ...
10101010 ---
10151015 # GCN-NOT: S_WAITCNT
10161016 # GCN: DS_WRXCHG_RTN_B32
10171017 # GCN-NOT: S_WAITCNT
1018 # GCN: S_ENDPGM
1018 # GCN: S_ENDPGM 0
10191019
10201020 name: atomicrmw_singlethread_acq_rel
10211021 body: |
10261026 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
10271027 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
10281028 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") acq_rel 4 into `i32 addrspace(3)* undef`)
1029 S_ENDPGM
1029 S_ENDPGM 0
10301030
10311031 ...
10321032 ---
10371037 # GCN-NOT: S_WAITCNT
10381038 # GCN: DS_WRXCHG_RTN_B32
10391039 # GCN-NOT: S_WAITCNT
1040 # GCN: S_ENDPGM
1040 # GCN: S_ENDPGM 0
10411041
10421042 name: atomicrmw_singlethread_seq_cst
10431043 body: |
10481048 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
10491049 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
10501050 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") seq_cst 4 into `i32 addrspace(3)* undef`)
1051 S_ENDPGM
1052
1053 ...
1051 S_ENDPGM 0
1052
1053 ...
5959 $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
6060 S_WAITCNT 3952
6161 FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32 addrspace(1)* undef`)
62 S_ENDPGM
62 S_ENDPGM 0
6363
6464 ...
153153 $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
154154 S_WAITCNT 3952
155155 FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.out)
156 S_ENDPGM
156 S_ENDPGM 0
157157
158158 ...
133133 $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
134134 S_WAITCNT 3952
135135 FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.out)
136 S_ENDPGM
136 S_ENDPGM 0
137137
138138 ...
2020 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
2121 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
2222 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
23 S_ENDPGM
23 S_ENDPGM 0
2424
2525 ...
2626 ---
4444 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
4545 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
4646 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
47 S_ENDPGM
47 S_ENDPGM 0
4848
4949 ...
5050 ---
6868 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
6969 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
7070 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
71 S_ENDPGM
71 S_ENDPGM 0
7272
7373 ...
7474 ---
9292 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
9393 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
9494 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
95 S_ENDPGM
95 S_ENDPGM 0
9696
9797 ...
9898 ---
116116 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
117117 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
118118 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
119 S_ENDPGM
119 S_ENDPGM 0
120120
121121 ...
122122 ---
140140 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
141141 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
142142 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
143 S_ENDPGM
143 S_ENDPGM 0
144144
145145 ...
146146 ---
164164 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
165165 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
166166 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
167 S_ENDPGM
167 S_ENDPGM 0
168168
169169 ...
170170 ---
188188 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
189189 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
190190 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
191 S_ENDPGM
191 S_ENDPGM 0
192192
193193 ...
194194 ---
212212 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
213213 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
214214 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
215 S_ENDPGM
215 S_ENDPGM 0
216216
217217 ...
218218 ---
236236 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
237237 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
238238 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
239 S_ENDPGM
239 S_ENDPGM 0
240240
241241 ...
242242 ---
260260 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
26126