]> granicus.if.org Git - llvm/commitdiff
[AMDGPU] Add support for immediate operand for S_ENDPGM
authorDavid Stuttard <david.stuttard@amd.com>
Tue, 12 Mar 2019 09:52:58 +0000 (09:52 +0000)
committerDavid Stuttard <david.stuttard@amd.com>
Tue, 12 Mar 2019 09:52:58 +0000 (09:52 +0000)
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

99 files changed:
lib/Target/AMDGPU/AMDGPUCallLowering.cpp
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h
lib/Target/AMDGPU/SIInsertSkips.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
lib/Target/AMDGPU/SIInstrInfo.td
lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
lib/Target/AMDGPU/SOPInstructions.td
test/CodeGen/AMDGPU/GlobalISel/legalize-block-addr.mir
test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
test/CodeGen/AMDGPU/GlobalISel/regbankselect-block-addr.mir
test/CodeGen/AMDGPU/GlobalISel/regbankselect-merge-values.mir
test/CodeGen/AMDGPU/break-smem-soft-clauses.mir
test/CodeGen/AMDGPU/break-vmem-soft-clauses.mir
test/CodeGen/AMDGPU/clamp-omod-special-case.mir
test/CodeGen/AMDGPU/cluster-flat-loads-postra.mir
test/CodeGen/AMDGPU/coalescer-extend-pruned-subrange.mir
test/CodeGen/AMDGPU/coalescer-subranges-another-copymi-not-live.mir
test/CodeGen/AMDGPU/coalescer-subranges-another-prune-error.mir
test/CodeGen/AMDGPU/coalescer-subregjoin-fullcopy.mir
test/CodeGen/AMDGPU/coalescer-with-subregs-bad-identical.mir
test/CodeGen/AMDGPU/coalescing-with-subregs-in-loop-bug.mir
test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir
test/CodeGen/AMDGPU/couldnt-join-subrange-3.mir
test/CodeGen/AMDGPU/endpgm-dce.mir
test/CodeGen/AMDGPU/flat-load-clustering.mir
test/CodeGen/AMDGPU/fold-imm-f16-f32.mir
test/CodeGen/AMDGPU/fold-immediate-operand-shrink-with-carry.mir
test/CodeGen/AMDGPU/fold-immediate-operand-shrink.mir
test/CodeGen/AMDGPU/fold-immediate-output-mods.mir
test/CodeGen/AMDGPU/fold-implicit-operand.mir
test/CodeGen/AMDGPU/fold-multiple.mir
test/CodeGen/AMDGPU/global-load-store-atomics.mir
test/CodeGen/AMDGPU/hazard-buffer-store-v-interp.mir
test/CodeGen/AMDGPU/hazard-inlineasm.mir
test/CodeGen/AMDGPU/hazard-kill.mir
test/CodeGen/AMDGPU/hazard.mir
test/CodeGen/AMDGPU/insert-skip-from-vcc.mir
test/CodeGen/AMDGPU/insert-skips-kill-uncond.mir
test/CodeGen/AMDGPU/inserted-wait-states.mir
test/CodeGen/AMDGPU/invert-br-undef-vcc.mir
test/CodeGen/AMDGPU/memory-legalizer-atomic-insert-end.mir
test/CodeGen/AMDGPU/memory-legalizer-invalid-addrspace.mir
test/CodeGen/AMDGPU/memory-legalizer-local.mir
test/CodeGen/AMDGPU/memory-legalizer-multiple-mem-operands-atomics.mir
test/CodeGen/AMDGPU/memory-legalizer-multiple-mem-operands-nontemporal-1.mir
test/CodeGen/AMDGPU/memory-legalizer-multiple-mem-operands-nontemporal-2.mir
test/CodeGen/AMDGPU/memory-legalizer-region.mir
test/CodeGen/AMDGPU/memory_clause.mir
test/CodeGen/AMDGPU/merge-load-store-physreg.mir
test/CodeGen/AMDGPU/merge-load-store-vreg.mir
test/CodeGen/AMDGPU/merge-load-store.mir
test/CodeGen/AMDGPU/misched-killflags.mir
test/CodeGen/AMDGPU/mode-register.mir
test/CodeGen/AMDGPU/movrels-bug.mir
test/CodeGen/AMDGPU/omod-nsz-flag.mir
test/CodeGen/AMDGPU/opt-sgpr-to-vgpr-copy.mir
test/CodeGen/AMDGPU/optimize-if-exec-masking.mir
test/CodeGen/AMDGPU/optimize-negated-cond-exec-masking.mir
test/CodeGen/AMDGPU/reduce-saveexec.mir
test/CodeGen/AMDGPU/regcoal-subrange-join-seg.mir
test/CodeGen/AMDGPU/regcoal-subrange-join.mir
test/CodeGen/AMDGPU/regcoalesce-cannot-join-failures.mir
test/CodeGen/AMDGPU/regcoalesce-dbg.mir
test/CodeGen/AMDGPU/regcoalesce-keep-valid-lanes-implicit-def-bug39602.mir
test/CodeGen/AMDGPU/regcoalesce-prune.mir
test/CodeGen/AMDGPU/regcoalescing-remove-partial-redundancy-assert.mir
test/CodeGen/AMDGPU/rename-independent-subregs-mac-operands.mir
test/CodeGen/AMDGPU/scalar-store-cache-flush.mir
test/CodeGen/AMDGPU/sched-crash-dbg-value.mir
test/CodeGen/AMDGPU/schedule-regpressure.mir
test/CodeGen/AMDGPU/sdwa-preserve.mir
test/CodeGen/AMDGPU/sdwa-scalar-ops.mir
test/CodeGen/AMDGPU/sendmsg-m0-hazard.mir
test/CodeGen/AMDGPU/shrink-vop3-carry-out.mir
test/CodeGen/AMDGPU/si-fix-sgpr-copies.mir
test/CodeGen/AMDGPU/si-lower-control-flow.mir
test/CodeGen/AMDGPU/smem-no-clause-coalesced.mir
test/CodeGen/AMDGPU/subreg-split-live-in-error.mir
test/CodeGen/AMDGPU/undefined-physreg-sgpr-spill.mir
test/CodeGen/AMDGPU/v_swap_b32.mir
test/CodeGen/AMDGPU/vccz-corrupt-bug-workaround.mir
test/CodeGen/AMDGPU/vop-shrink-frame-index.mir
test/CodeGen/AMDGPU/vop-shrink-non-ssa.mir
test/CodeGen/AMDGPU/waitcnt-back-edge-loop.mir
test/CodeGen/AMDGPU/waitcnt-loop-irreducible.mir
test/CodeGen/AMDGPU/waitcnt-loop-single-basic-block.mir
test/CodeGen/AMDGPU/waitcnt-preexisting.mir
test/CodeGen/AMDGPU/waitcnt.mir
test/CodeGen/MIR/AMDGPU/expected-target-index-name.mir
test/CodeGen/MIR/AMDGPU/invalid-target-index-operand.mir
test/CodeGen/MIR/AMDGPU/mir-canon-multi.mir
test/CodeGen/MIR/AMDGPU/stack-id.mir
test/CodeGen/MIR/AMDGPU/syncscopes.mir
test/CodeGen/MIR/AMDGPU/target-flags.mir
test/CodeGen/MIR/AMDGPU/target-index-operands.mir
test/MC/AMDGPU/s_endpgm.s [new file with mode: 0644]
test/MachineVerifier/verifier-implicit-virtreg-invalid-physreg-liveness.mir

index 20dbcf309555ed28ae7c6d969cfb761a1fb1ee1d..4045b18be36626c2e08300b5ce0d5c8af8a9537c 100644 (file)
@@ -37,7 +37,7 @@ bool AMDGPUCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
   if (Val)
     return false;
 
-  MIRBuilder.buildInstr(AMDGPU::S_ENDPGM);
+  MIRBuilder.buildInstr(AMDGPU::S_ENDPGM).addImm(0);
   return true;
 }
 
index 60af90d8252cf18915b0fc5ad8fe7b5378276334..427e0c599cc6209c2b0f4d9ca836860e52d52197 100644 (file)
@@ -174,6 +174,7 @@ public:
     ImmTyNegHi,
     ImmTySwizzle,
     ImmTyGprIdxMode,
+    ImmTyEndpgm,
     ImmTyHigh
   };
 
@@ -517,6 +518,7 @@ public:
   bool isGPRIdxMode() const;
   bool isS16Imm() const;
   bool isU16Imm() const;
+  bool isEndpgm() const;
 
   StringRef getExpressionAsToken() const {
     assert(isExpr());
@@ -706,6 +708,9 @@ public:
     case ImmTySwizzle: OS << "Swizzle"; break;
     case ImmTyGprIdxMode: OS << "GprIdxMode"; break;
     case ImmTyHigh: OS << "High"; break;
+    case ImmTyEndpgm:
+      OS << "Endpgm";
+      break;
     }
   }
 
@@ -1187,6 +1192,9 @@ public:
   void cvtSdwaVOPC(MCInst &Inst, const OperandVector &Operands);
   void cvtSDWA(MCInst &Inst, const OperandVector &Operands,
                 uint64_t BasicInstType, bool skipVcc = false);
+
+  OperandMatchResultTy parseEndpgmOp(OperandVector &Operands);
+  AMDGPUOperand::Ptr defaultEndpgmImmOperands() const;
 };
 
 struct OptionalOperand {
@@ -5523,6 +5531,10 @@ AMDGPUOperand::Ptr AMDGPUAsmParser::defaultRowMask() const {
   return AMDGPUOperand::CreateImm(this, 0xf, SMLoc(), AMDGPUOperand::ImmTyDppRowMask);
 }
 
+AMDGPUOperand::Ptr AMDGPUAsmParser::defaultEndpgmImmOperands() const {
+  return AMDGPUOperand::CreateImm(this, 0, SMLoc(), AMDGPUOperand::ImmTyEndpgm);
+}
+
 AMDGPUOperand::Ptr AMDGPUAsmParser::defaultBankMask() const {
   return AMDGPUOperand::CreateImm(this, 0xf, SMLoc(), AMDGPUOperand::ImmTyDppBankMask);
 }
@@ -5799,3 +5811,28 @@ unsigned AMDGPUAsmParser::validateTargetOperandClass(MCParsedAsmOperand &Op,
     return Match_InvalidOperand;
   }
 }
+
+//===----------------------------------------------------------------------===//
+// endpgm
+//===----------------------------------------------------------------------===//
+
+OperandMatchResultTy AMDGPUAsmParser::parseEndpgmOp(OperandVector &Operands) {
+  SMLoc S = Parser.getTok().getLoc();
+  int64_t Imm = 0;
+
+  if (!parseExpr(Imm)) {
+    // The operand is optional, if not present default to 0
+    Imm = 0;
+  }
+
+  if (!isUInt<16>(Imm)) {
+    Error(S, "expected a 16-bit value");
+    return MatchOperand_ParseFail;
+  }
+
+  Operands.push_back(
+      AMDGPUOperand::CreateImm(this, Imm, S, AMDGPUOperand::ImmTyEndpgm));
+  return MatchOperand_Success;
+}
+
+bool AMDGPUOperand::isEndpgm() const { return isImmTy(ImmTyEndpgm); }
index 0c9b9192c4f5c578eaa5f5c642d9e7c42f165234..28a1cf74804bd75dccb7de42162c87c950e3bd26 100644 (file)
@@ -1209,6 +1209,17 @@ void AMDGPUInstPrinter::printHwreg(const MCInst *MI, unsigned OpNo,
   O << ')';
 }
 
+void AMDGPUInstPrinter::printEndpgm(const MCInst *MI, unsigned OpNo,
+                                    const MCSubtargetInfo &STI,
+                                    raw_ostream &O) {
+  uint16_t Imm = MI->getOperand(OpNo).getImm();
+  if (Imm == 0) {
+    return;
+  }
+
+  O << formatDec(Imm);
+}
+
 #include "AMDGPUGenAsmWriter.inc"
 
 void R600InstPrinter::printInst(const MCInst *MI, raw_ostream &O,
index e0c44399d494c1f8167bed3203d5dee6e4efa80d..084350c3f6730190df5fd0c7594cfed9c7315222 100644 (file)
@@ -213,6 +213,8 @@ protected:
                      const MCSubtargetInfo &STI, raw_ostream &O);
   void printHwreg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
                   raw_ostream &O);
+  void printEndpgm(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
+                   raw_ostream &O);
 };
 
 class R600InstPrinter : public MCInstPrinter {
index 9539deeb7d9c370baa13ab4b9c1c75101c51fd8b..9ea05d95680c45e43be834022fe85538abc3f563 100644 (file)
@@ -176,7 +176,7 @@ bool SIInsertSkips::skipIfDead(MachineInstr &MI, MachineBasicBlock &NextBB) {
     .addImm(0); // en
 
   // ... and terminate wavefront.
-  BuildMI(*SkipBB, Insert, DL, TII->get(AMDGPU::S_ENDPGM));
+  BuildMI(*SkipBB, Insert, DL, TII->get(AMDGPU::S_ENDPGM)).addImm(0);
 
   return true;
 }
index 484bdfb5ab07eb09987e168a9b3bf57466f836b3..ec6779f46c66ca847a2f9e79f157d35a8280652e 100644 (file)
@@ -1137,9 +1137,13 @@ void SIInstrInfo::insertReturn(MachineBasicBlock &MBB) const {
 
   if (MBB.succ_empty()) {
     bool HasNoTerminator = MBB.getFirstTerminator() == MBB.end();
-    if (HasNoTerminator)
-      BuildMI(MBB, MBB.end(), DebugLoc(),
-              get(Info->returnsVoid() ? AMDGPU::S_ENDPGM : AMDGPU::SI_RETURN_TO_EPILOG));
+    if (HasNoTerminator) {
+      if (Info->returnsVoid()) {
+        BuildMI(MBB, MBB.end(), DebugLoc(), get(AMDGPU::S_ENDPGM)).addImm(0);
+      } else {
+        BuildMI(MBB, MBB.end(), DebugLoc(), get(AMDGPU::SI_RETURN_TO_EPILOG));
+      }
+    }
   }
 }
 
index c5811e471452d3be955ae810af9940d6d4c0115d..c3d9ff7310fc8fe15b70b931789e0beedb1ed5ac 100644 (file)
@@ -668,6 +668,14 @@ def SwizzleMatchClass : AsmOperandClass {
   let IsOptional = 1;
 }
 
+def EndpgmMatchClass : AsmOperandClass {
+  let Name = "EndpgmImm";
+  let PredicateMethod = "isEndpgm";
+  let ParserMethod = "parseEndpgmOp";
+  let RenderMethod = "addImmOperands";
+  let IsOptional = 1;
+}
+
 def ExpTgtMatchClass : AsmOperandClass {
   let Name = "ExpTgt";
   let PredicateMethod = "isExpTgt";
@@ -685,6 +693,11 @@ def SwizzleImm : Operand<i16> {
   let ParserMatchClass = SwizzleMatchClass;
 }
 
+def EndpgmImm : Operand<i16> {
+  let PrintMethod = "printEndpgm";
+  let ParserMatchClass = EndpgmMatchClass;
+}
+
 def SWaitMatchClass : AsmOperandClass {
   let Name = "SWaitCnt";
   let RenderMethod = "addImmOperands";
index 0819fde0e1df2ec8f35f82403b30683996380002..783232071e9cce74f8a6bbd248761d006f782fd6 100644 (file)
@@ -247,9 +247,10 @@ bool SIOptimizeExecMaskingPreRA::runOnMachineFunction(MachineFunction &MF) {
 
       // Skip this if the endpgm has any implicit uses, otherwise we would need
       // to be careful to update / remove them.
+      // S_ENDPGM always has a single imm operand that is not used other than to
+      // end up in the encoding
       MachineInstr &Term = MBB.back();
-      if (Term.getOpcode() != AMDGPU::S_ENDPGM ||
-          Term.getNumOperands() != 0)
+      if (Term.getOpcode() != AMDGPU::S_ENDPGM || Term.getNumOperands() != 1)
         continue;
 
       SmallVector<MachineBasicBlock*, 4> Blocks({&MBB});
index aef30079b7ce8d0ae2213a4df4b76e74c8ed1dd1..d1b13521936ed45402b049b568d1256d380f9461 100644 (file)
@@ -866,9 +866,7 @@ def S_NOP : SOPP <0x00000000, (ins i16imm:$simm16), "s_nop $simm16">;
 
 let isTerminator = 1 in {
 
-def S_ENDPGM : SOPP <0x00000001, (ins), "s_endpgm",
-  [(AMDGPUendpgm)]> {
-  let simm16 = 0;
+def S_ENDPGM : SOPP <0x00000001, (ins EndpgmImm:$simm16), "s_endpgm $simm16"> {
   let isBarrier = 1;
   let isReturn = 1;
 }
@@ -1044,6 +1042,11 @@ def : GCNPat <
 // SOP1 Patterns
 //===----------------------------------------------------------------------===//
 
+def : GCNPat <
+  (AMDGPUendpgm),
+    (S_ENDPGM (i16 0))
+>;
+
 def : GCNPat <
   (i64 (ctpop i64:$src)),
     (i64 (REG_SEQUENCE SReg_64,
index c532d117e07b3e05d52a98d0b46d84eb42cd5f02..0a39304d44662d2d184cad54c5ca16c50baa587a 100644 (file)
@@ -21,8 +21,8 @@ body:             |
   bb.1 (%ir-block.0):
     ; CHECK-LABEL: name: test_blockaddress
     ; CHECK: [[BLOCK_ADDR:%[0-9]+]]:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
-    ; CHECK: S_ENDPGM implicit [[BLOCK_ADDR]](p0)
+    ; CHECK: S_ENDPGM 0, implicit [[BLOCK_ADDR]](p0)
     %0:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
-    S_ENDPGM implicit %0
+    S_ENDPGM 0, implicit %0
 
 ...
index a38ef998a9ec714a5656ab2123a10c07b0082409..167af082da57e74e04956eb61b2a7577aff3d8d5 100644 (file)
@@ -32,9 +32,9 @@ body: |
 
     ; CHECK-LABEL: name: test_constant_s1
     ; CHECK: [[C:%[0-9]+]]:_(s1) = G_CONSTANT i1 false
-    ; CHECK: S_ENDPGM implicit [[C]](s1)
+    ; CHECK: S_ENDPGM 0, implicit [[C]](s1)
     %1:_(s1) = G_CONSTANT i1 0
-    S_ENDPGM implicit %1
+    S_ENDPGM 0, implicit %1
 ...
 
 ---
index 10a9bea6a8743b1c3d27503dd3184ecaf3cb233e..17b1e0982e67dcf8445d721130392964296db2a2 100644 (file)
@@ -22,8 +22,8 @@ body:             |
   bb.1 (%ir-block.0):
     ; CHECK-LABEL: name: test_blockaddress
     ; CHECK: [[BLOCK_ADDR:%[0-9]+]]:sgpr(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
-    ; CHECK: S_ENDPGM implicit [[BLOCK_ADDR]](p0)
+    ; CHECK: S_ENDPGM 0, implicit [[BLOCK_ADDR]](p0)
     %0:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
-    S_ENDPGM implicit %0
+    S_ENDPGM 0, implicit %0
 
 ...
index 3a2f10a40853f94d2cddf84d4f826e09ff56ea7f..7d1f5d7ff1fc021489d218b71b8983a071c7b225 100644 (file)
@@ -14,12 +14,12 @@ body: |
     ; CHECK: [[EXTRACT:%[0-9]+]]:sgpr(s32) = G_EXTRACT [[COPY]](s64), 0
     ; CHECK: [[EXTRACT1:%[0-9]+]]:sgpr(s32) = G_EXTRACT [[COPY]](s64), 32
     ; CHECK: [[MV:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[EXTRACT]](s32), [[EXTRACT1]](s32)
-    ; CHECK: S_ENDPGM implicit [[MV]](s64)
+    ; CHECK: S_ENDPGM 0, implicit [[MV]](s64)
     %0:_(s64) = COPY $sgpr0_sgpr1
     %1:_(s32) = G_EXTRACT %0, 0
     %2:_(s32) = G_EXTRACT %0, 32
     %3:_(s64) = G_MERGE_VALUES %1, %2
-    S_ENDPGM implicit %3
+    S_ENDPGM 0, implicit %3
 ...
 
 ---
@@ -34,11 +34,11 @@ body: |
     ; CHECK: [[EXTRACT:%[0-9]+]]:vgpr(s32) = G_EXTRACT [[COPY]](s64), 0
     ; CHECK: [[EXTRACT1:%[0-9]+]]:vgpr(s32) = G_EXTRACT [[COPY]](s64), 32
     ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[EXTRACT]](s32), [[EXTRACT1]](s32)
-    ; CHECK: S_ENDPGM implicit [[MV]](s64)
+    ; CHECK: S_ENDPGM 0, implicit [[MV]](s64)
     %0:_(s64) = COPY $vgpr0_vgpr1
     %1:_(s32) = G_EXTRACT %0, 0
     %2:_(s32) = G_EXTRACT %0, 32
     %3:_(s64) = G_MERGE_VALUES %1, %2
-    S_ENDPGM implicit %3
+    S_ENDPGM 0, implicit %3
 ...
 
index 0ddfa758a2981894c6e99de0d4a7e80252868b62..25f8d118b2a289ca275fc41175fb4238b13d94e4 100644 (file)
@@ -9,9 +9,9 @@ body: |
   bb.0:
     ; GCN-LABEL: name: trivial_smem_clause_load_smrd4_x1
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Trivial clause at beginning of program
@@ -22,10 +22,10 @@ body: |
     ; GCN-LABEL: name: trivial_smem_clause_load_smrd4_x2
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr1 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr1 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Trivial clause at beginning of program
@@ -37,11 +37,11 @@ body: |
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
     ; GCN-NEXT: $sgpr1 = S_LOAD_DWORD_IMM $sgpr6_sgpr7, 0, 0
     ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
     $sgpr1 = S_LOAD_DWORD_IMM $sgpr6_sgpr7, 0, 0
     $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Trivial clause at beginning of program
@@ -54,12 +54,12 @@ body: |
     ; GCN-NEXT: $sgpr1 = S_LOAD_DWORD_IMM $sgpr8_sgpr9, 0, 0
     ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
     ; GCN-NEXT: $sgpr3 = S_LOAD_DWORD_IMM $sgpr16_sgpr17, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
     $sgpr1 = S_LOAD_DWORD_IMM $sgpr8_sgpr9, 0, 0
     $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
     $sgpr3 = S_LOAD_DWORD_IMM $sgpr16_sgpr17, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Reuse of same input pointer is OK
@@ -69,10 +69,10 @@ body: |
     ; GCN-LABEL: name: trivial_smem_clause_load_smrd4_x2_sameptr
     ; GCN: $sgpr12 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr13 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr12 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr13 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # 32-bit load partially clobbers its own ptr reg
@@ -82,9 +82,9 @@ body: |
   bb.0:
     ; GCN-LABEL: name: smrd_load4_overwrite_ptr_lo
     ; GCN: $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # 32-bit load partially clobbers its own ptr reg
@@ -94,9 +94,9 @@ body: |
   bb.0:
     ; GCN-LABEL: name: smrd_load4_overwrite_ptr_hi
     ; GCN: $sgpr11 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr11 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # 64-bit load clobbers its own ptr reg
@@ -106,9 +106,9 @@ body: |
   bb.0:
     ; GCN-LABEL: name: smrd_load8_overwrite_ptr
     ; GCN: $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # vmcnt has 4 bits, so maximum 16 outstanding loads. The waitcnt
@@ -137,7 +137,7 @@ body: |
     ; GCN-NEXT: $sgpr28 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr0 = S_LOAD_DWORD_IMM $sgpr30_sgpr31, 0, 0
     ; 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
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr13 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr14 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr15 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
@@ -160,7 +160,7 @@ body: |
 
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr30_sgpr31, 0, 0
     $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
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -172,10 +172,10 @@ body: |
     ; GCN: $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $sgpr12 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr10 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr12 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -186,10 +186,10 @@ body: |
     ; GCN-LABEL: name: break_smem_clause_simple_load_smrd4_hi_ptr
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr3 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr3 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -201,10 +201,10 @@ body: |
     ; GCN: $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
     $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -215,10 +215,10 @@ body: |
     ; GCN-LABEL: name: break_smem_clause_simple_load_smrd16_ptr
     ; GCN: $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr12_sgpr13_sgpr14_sgpr15 = S_LOAD_DWORDX4_IMM $sgpr6_sgpr7, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
     $sgpr12_sgpr13_sgpr14_sgpr15 = S_LOAD_DWORDX4_IMM $sgpr6_sgpr7, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -232,13 +232,13 @@ body: |
   ; GCN: bb.1:
   ; XNACK-NEXT:   S_NOP 0
   ; GCN-NEXT:   $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
-  ; GCN-NEXT:   S_ENDPGM
+  ; GCN-NEXT:   S_ENDPGM 0
   bb.0:
     $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0
 
   bb.1:
     $sgpr10_sgpr11 = S_LOAD_DWORDX2_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # The load clobbers the pointer of the store, so it needs to break.
@@ -250,10 +250,10 @@ body: |
     ; GCN-LABEL: name: break_smem_clause_store_load_into_ptr_smrd4
     ; GCN: S_STORE_DWORD_IMM $sgpr16, $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr12 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     S_STORE_DWORD_IMM $sgpr16, $sgpr10_sgpr11, 0, 0
     $sgpr12 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # The load clobbers the data of the store, so it needs to break.
@@ -266,10 +266,10 @@ body: |
     ; GCN-LABEL: name: break_smem_clause_store_load_into_data_smrd4
     ; GCN: S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr8 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     S_STORE_DWORD_IMM $sgpr8, $sgpr10_sgpr11, 0, 0
     $sgpr8 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Regular VALU instruction breaks clause, no nop needed
@@ -281,11 +281,11 @@ body: |
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $vgpr8 = V_MOV_B32_e32 0, implicit $exec
     ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $vgpr8 = V_MOV_B32_e32 0, implicit $exec
     $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Regular SALU instruction breaks clause, no nop needed
@@ -297,11 +297,11 @@ body: |
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $sgpr8 = S_MOV_B32 0
     ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $sgpr8 = S_MOV_B32 0
     $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 name: ds_inst_breaks_smem_clause
@@ -312,11 +312,11 @@ body: |
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
     ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
     $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -328,11 +328,11 @@ body: |
     ; GCN: $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     ; GCN-NEXT: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
     $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
     $sgpr2 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # FIXME: Should this be handled?
@@ -344,8 +344,8 @@ body: |
     ; GCN: $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0, implicit $sgpr12_sgpr13
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $sgpr12_sgpr13 = S_LOAD_DWORDX2_IMM $sgpr6_sgpr7, 0, 0
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM $sgpr10_sgpr11, 0, 0, implicit $sgpr12_sgpr13
     $sgpr12_sgpr13 = S_LOAD_DWORDX2_IMM $sgpr6_sgpr7, 0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index f2a88b6b73792d5bfdbe61b35b4600910000ec11..cb5310ab6d20d30f62a353dee6656dd2c7bccfd1 100644 (file)
@@ -8,10 +8,10 @@ body: |
   bb.0:
     ; GCN-LABEL: name: trivial_clause_load_flat4_x1
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Trivial clause at beginning of program
@@ -22,11 +22,11 @@ body: |
     ; GCN-LABEL: name: trivial_clause_load_flat4_x2
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr1 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Trivial clause at beginning of program
@@ -38,12 +38,12 @@ body: |
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr5_vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr7_vgpr8, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr1 = FLAT_LOAD_DWORD $vgpr5_vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2 = FLAT_LOAD_DWORD $vgpr7_vgpr8, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Trivial clause at beginning of program
@@ -56,13 +56,13 @@ body: |
     ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr8_vgpr9, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr3 = FLAT_LOAD_DWORD $vgpr10_vgpr11, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr1 = FLAT_LOAD_DWORD $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2 = FLAT_LOAD_DWORD $vgpr8_vgpr9, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr3 = FLAT_LOAD_DWORD $vgpr10_vgpr11, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Reuse of same input pointer is OK
@@ -73,11 +73,11 @@ body: |
     ; GCN-LABEL: name: trivial_clause_load_flat4_x2_sameptr
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # 32-bit load partially clobbers its own ptr reg
@@ -87,10 +87,10 @@ body: |
   bb.0:
     ; GCN-LABEL: name: flat_load4_overwrite_ptr_lo
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # 32-bit load partially clobbers its own ptr reg
@@ -100,10 +100,10 @@ body: |
   bb.0:
     ; GCN-LABEL: name: flat_load4_overwrite_ptr_hi
     ; GCN: $vgpr1 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr1 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # 64-bit load clobbers its own ptr reg
@@ -113,10 +113,10 @@ body: |
   bb.0:
     ; GCN-LABEL: name: flat_load8_overwrite_ptr
     ; GCN: $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # vmcnt has 4 bits, so maximum 16 outstanding loads. The waitcnt
@@ -147,7 +147,7 @@ body: |
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; 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
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr2 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr3 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, implicit $exec, implicit $flat_scr
@@ -171,7 +171,7 @@ body: |
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $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
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -183,11 +183,11 @@ body: |
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -199,11 +199,11 @@ body: |
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr3 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr3 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -215,11 +215,11 @@ body: |
     ; GCN: $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -232,10 +232,10 @@ body: |
     ; GCN: $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2_vgpr3_vgpr4_vgpr5 = FLAT_LOAD_DWORDX4 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2_vgpr3_vgpr4_vgpr5 = FLAT_LOAD_DWORDX4 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -253,14 +253,14 @@ body: |
   ; GCN: bb.1:
   ; XNACK-NEXT:  S_NOP 0
   ; GCN-NEXT:   $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-  ; GCN-NEXT:   S_ENDPGM
+  ; GCN-NEXT:   S_ENDPGM 0
 
   bb.0:
     $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
 
   bb.1:
     $vgpr2_vgpr3 = FLAT_LOAD_DWORDX2 $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # The load clobbers the pointer of the store, so it needs to break.
@@ -272,11 +272,11 @@ body: |
     ; GCN-LABEL: name: break_clause_store_load_into_ptr_flat4
     ; GCN: FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # The load clobbers the data of the store, so it needs to break.
@@ -289,11 +289,11 @@ body: |
     ; GCN-LABEL: name: break_clause_store_load_into_data_flat4
     ; GCN: FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr0 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr0 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Regular VALU instruction breaks clause, no nop needed
@@ -307,12 +307,12 @@ body: |
     ; GCN-NEXT: $vgpr8 = V_MOV_B32_e32 0, implicit $exec
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr8 = V_MOV_B32_e32 0, implicit $exec
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Regular SALU instruction breaks clause, no nop needed
@@ -326,12 +326,12 @@ body: |
     ; GCN-NEXT: $sgpr8 = S_MOV_B32 0
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $sgpr8 = S_MOV_B32 0
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -344,12 +344,12 @@ body: |
     ; GCN-NEXT: $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr8 = DS_READ_B32 $vgpr9, 0, 0, implicit $m0, implicit $exec
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -361,12 +361,12 @@ body: |
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $sgpr8 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $sgpr8 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # FIXME: Should this be handled?
@@ -378,11 +378,11 @@ body: |
     ; GCN: $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr, implicit $vgpr4_vgpr5
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr4_vgpr5 = FLAT_LOAD_DWORDX2 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0_vgpr1 = FLAT_LOAD_DWORDX2 $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr, implicit $vgpr4_vgpr5
     $vgpr4_vgpr5 = FLAT_LOAD_DWORDX2 $vgpr6_vgpr7, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 name: trivial_clause_load_mubuf4_x2
@@ -392,11 +392,11 @@ body: |
     ; GCN-LABEL: name: trivial_clause_load_mubuf4_x2
     ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     ; GCN-NEXT: $vgpr3 = BUFFER_LOAD_DWORD_OFFEN $vgpr4, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     $vgpr3 = BUFFER_LOAD_DWORD_OFFEN $vgpr4, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 name: break_clause_simple_load_mubuf_offen_ptr
@@ -407,11 +407,11 @@ body: |
     ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr3, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr3, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # BUFFER instructions overwriting their own inputs is supposedly OK.
@@ -424,11 +424,11 @@ body: |
     ; GCN: $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     ; GCN-NEXT: $vgpr1 = V_MOV_B32_e32 0, implicit $exec
     ; GCN-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     $vgpr1 = V_MOV_B32_e32 0, implicit $exec
     $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Break a clause from interference between mubuf and flat instructions
@@ -441,11 +441,11 @@ body: |
     ; GCN: $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr0 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 # Break a clause from interference between mubuf and flat instructions
 
@@ -454,7 +454,7 @@ body: |
 # GCN-NEXT: $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4
 # XNACK-NEXT: S_NOP 0
 # GCN-NEXT: $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: break_clause_mubuf_load_flat_load
 
 body: |
@@ -462,7 +462,7 @@ body: |
     $vgpr0 = BUFFER_LOAD_DWORD_OFFEN $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     $vgpr1 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
 
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -474,11 +474,11 @@ body: |
     ; GCN: $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr4 = FLAT_ATOMIC_ADD_RTN $vgpr5_vgpr6, $vgpr7, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr2 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr4 = FLAT_ATOMIC_ADD_RTN $vgpr5_vgpr6, $vgpr7, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 name: break_clause_atomic_nortn_ptr_load_flat4
@@ -488,11 +488,11 @@ body: |
     ; GCN-LABEL: name: break_clause_atomic_nortn_ptr_load_flat4
     ; GCN: FLAT_ATOMIC_ADD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec, implicit $flat_scr
     ; GCN-NEXT: $vgpr2 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     FLAT_ATOMIC_ADD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr2 = FLAT_LOAD_DWORD $vgpr3_vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -504,11 +504,11 @@ body: |
     ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     ; XNACK-NEXT: S_NOP 0
     ; GCN-NEXT: $vgpr2 = BUFFER_ATOMIC_ADD_OFFEN_RTN $vgpr2, $vgpr5, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     $vgpr2 = BUFFER_ATOMIC_ADD_OFFEN_RTN $vgpr2, $vgpr5, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -519,11 +519,11 @@ body: |
     ; GCN-LABEL: name: break_clause_atomic_nortn_ptr_load_mubuf4
     ; GCN: BUFFER_ATOMIC_ADD_OFFEN $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
     ; GCN-NEXT: $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
 
     BUFFER_ATOMIC_ADD_OFFEN $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, implicit $exec
     $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Make sure there is no assert on mubuf instructions which do not have
@@ -535,10 +535,10 @@ body: |
     ; GCN-LABEL: name: no_break_clause_mubuf_load_novaddr
     ; GCN: $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     ; GCN-NEXT: $vgpr3 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    ; GCN-NEXT: S_ENDPGM
+    ; GCN-NEXT: S_ENDPGM 0
     $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
     $vgpr3 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Loads and stores using different addresses theoretically does not
@@ -557,7 +557,7 @@ body: |
     $vgpr10 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     FLAT_STORE_DWORD $vgpr2_vgpr3, $vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr11 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Loads and stores using the same address needs a nop.
@@ -576,5 +576,5 @@ body: |
     $vgpr10 = FLAT_LOAD_DWORD $vgpr2_vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr
     FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr11 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 243358fb7a377acafb60f6b97548c866e4ecd776..8d0dfdb069986290f388fb261d7a87967bee793f 100644 (file)
@@ -59,7 +59,7 @@ body:             |
     %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
     %21 = V_MAX_F32_e64 0, killed %20, 0, killed %20, 0, 0, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -121,7 +121,7 @@ body:             |
     %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
     %21 = V_MAX_F32_e64 0, killed %20, 0, killed %20, 1, 3, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Don't fold a mul that looks like an omod if itself has omod set
@@ -184,7 +184,7 @@ body:             |
     %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
     %21 = V_MUL_F32_e64 0, killed %20, 0, 1056964608, 0, 3, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -249,7 +249,7 @@ body:             |
     %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
     %21 = V_MUL_F32_e64 0, killed %20, 0, 1056964608, 1, 0, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -326,7 +326,7 @@ body:             |
     %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
     %21 = V_ADD_F32_e64 0, killed %20, 0, killed %20, 0, 3, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -391,7 +391,7 @@ body:             |
     %20 = V_ADD_F32_e64 0, killed %17, 0, 1065353216, 0, 0, implicit $exec
     %21 = V_ADD_F32_e64 0, killed %20, 0, killed %20, 1, 0, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 killed %21, %26, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
index 79dccbff0ef6dbcd0973cb7f93ee59caa9c5e996..8fa933e90201955acd5090a6872e6fb602cd7739 100644 (file)
@@ -26,6 +26,6 @@ body:             |
     $vgpr1 = V_ADDC_U32_e32 $vgpr3, killed $vgpr6, implicit-def dead $vcc, implicit $vcc, implicit $exec
     FLAT_STORE_DWORD $vgpr2_vgpr3, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
     FLAT_STORE_DWORD $vgpr0_vgpr1, killed $vgpr4, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 864933af5462e097e5d598dbd76ee7e692f91934..2e4624ed3a4e0e9b851d6edfa08451edfcc4c78c 100644 (file)
@@ -31,7 +31,7 @@ body: |
     %15:sreg_64_xexec = V_CMP_EQ_U32_e64 0, %14, implicit $exec
     %16:vgpr_32 = V_CNDMASK_B32_e64 0, 1, %15, implicit $exec
     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)
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2:
     successors: %bb.3, %bb.4
index 1bc8922cf414dcb010b234decb2b3b058a116e4a..de042f68bc9c4b2e1895200e00005d15a172b4e9 100644 (file)
@@ -129,5 +129,5 @@ body:             |
     %29:vgpr_32 = V_ADD_F32_e32 0, killed %28, implicit $exec
     $m0 = S_MOV_B32 -1
     DS_WRITE_B32 undef %30:vgpr_32, killed %29, 0, 0, implicit $m0, implicit $exec :: (store 4 into `i32 addrspace(3)* undef`, addrspace 3)
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 258881b5dc8fbf70b929e6a4b870958e4fe584c2..41af493816d69d67375f3db332564660e21ba0d3 100644 (file)
@@ -264,5 +264,5 @@ body:             |
     %115:vgpr_32 = V_MAX_F32_e32 0, killed %114, implicit $exec
     %116:vgpr_32 = V_CVT_PKRTZ_F16_F32_e64 0, killed %115, 0, 1065353216, 0, 0, implicit $exec
     EXP 0, undef %117:vgpr_32, killed %116, undef %118:vgpr_32, undef %119:vgpr_32, -1, -1, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 3f0f5e6bfbd0e8730ae2ba97c4d00904c0cab79f..24e99d1e51f5a98c0164cfc1a086209f1cf6dcf8 100644 (file)
@@ -156,7 +156,7 @@ body: |
     %54:vreg_128 = COPY killed %38
     %55:vgpr_32 = V_FMA_F32 0, killed %54.sub1, 0, target-flags(amdgpu-gotprel32-lo) 1056964608, 0, 1056964608, 0, 0, implicit $exec
     EXP 1, undef %56:vgpr_32, killed %55, undef %57:vgpr_32, undef %58:vgpr_32, -1, 0, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.18:
     successors: %bb.7(0x80000000)
index 3f57981052c39342cca6449e3eb4b7a2ef62caa1..b2d20644774ee482af3cae7a117dbf660bd46206 100644 (file)
@@ -180,5 +180,5 @@ body: |
     successors: %bb.21(0x80000000)
 
   bb.21:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 062e1af4927d9029eefd36238c9bf9940b123c1f..37a0eb40b55031c66f7f0403e7e9af1872b55ba2 100644 (file)
@@ -93,6 +93,6 @@ body: |
     undef %32.sub0:vreg_128 = COPY killed %31.sub0
     %32.sub2:vreg_128 = COPY %33
     $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %32:vreg_128
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 84069ec735d6b9d0da4358e4f296e2c1395dd077..256a97448d54d5c82e387c7a0b5af91490a0be81 100644 (file)
@@ -55,7 +55,7 @@ body:             |
     %9 = S_AND_B32 killed %7, killed %8, implicit-def dead $scc
     %10 = COPY %9
     BUFFER_STORE_DWORD_OFFSET killed %10, killed %6, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -158,7 +158,7 @@ body:             |
     %31 = V_AND_B32_e64 %34, %34, implicit $exec
     FLAT_STORE_DWORD %37, %31, 0, 0, 0, implicit $exec, implicit $flat_scr
 
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -220,7 +220,7 @@ body:             |
     %12 = S_LSHL_B32 killed %5, 12, implicit-def dead $scc
     %13 = COPY %12
     BUFFER_STORE_DWORD_OFFSET killed %13, killed %10, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -361,7 +361,7 @@ body:             |
     %28 = V_LSHL_B32_e32 %27, %6, implicit $exec
     FLAT_STORE_DWORD %20, %28, 0, 0, 0, implicit $exec, implicit $flat_scr
 
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -420,7 +420,7 @@ body:             |
     %12 = S_ASHR_I32 killed %5, 12, implicit-def dead $scc
     %13 = COPY %12
     BUFFER_STORE_DWORD_OFFSET killed %13, killed %10, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -569,7 +569,7 @@ body:             |
     %28 = V_ASHR_I32_e32 %27, %35, implicit $exec
     FLAT_STORE_DWORD %20, %28, 0, 0, 0, implicit $exec, implicit $flat_scr
 
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -628,7 +628,7 @@ body:             |
     %12 = S_LSHR_B32 killed %5, 12, implicit-def dead $scc
     %13 = COPY %12
     BUFFER_STORE_DWORD_OFFSET killed %13, killed %10, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -778,7 +778,7 @@ body:             |
     %28 = V_LSHR_B32_e32 %27, %35, implicit $exec
     FLAT_STORE_DWORD %20, %28, 0, 0, 0, implicit $exec, implicit $flat_scr
 
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -788,7 +788,7 @@ body:             |
 # GCN-LABEL: name: undefined_vreg_operand{{$}}
 # GCN: bb.0
 # GCN-NEXT: FLAT_STORE_DWORD undef %3:vreg_64, undef %1:vgpr_32,
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: undefined_vreg_operand
 tracksRegLiveness: true
 registers:
@@ -801,7 +801,7 @@ body:             |
     %0 = V_MOV_B32_e32 0, implicit $exec
     %2 = V_XOR_B32_e64 killed %0, undef %1, implicit $exec
     FLAT_STORE_DWORD undef %3, %2, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -828,13 +828,13 @@ body:             |
   bb.3:
     liveins: $vcc
     SI_END_CF %0, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
-    S_ENDPGM implicit $vcc
+    S_ENDPGM 0, implicit $vcc
 
 ...
 ---
 # GCN-LABEL: name: constant_fold_lshl_or_reg0_immreg_reg{{$}}
 # GCN: %2:vgpr_32 = COPY $vgpr0, implicit $exec
-# GCN-NEXT: S_ENDPGM implicit %2
+# GCN-NEXT: S_ENDPGM 0, implicit %2
 
 name: constant_fold_lshl_or_reg0_immreg_reg
 alignment:       0
@@ -851,7 +851,7 @@ body:             |
   %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
   %1:vgpr_32 = V_MOV_B32_e32 16, implicit $exec
   %2:vgpr_32 = V_LSHL_OR_B32 %0,%1, $vgpr0, implicit $exec
-  S_ENDPGM implicit %2
+  S_ENDPGM 0, implicit %2
 
 ...
 
@@ -859,7 +859,7 @@ body:             |
 
 # GCN-LABEL: name: constant_fold_lshl_or_reg0_immreg_imm{{$}}
 # GCN: %2:vgpr_32 = V_MOV_B32_e32 10, implicit $exec
-# GCN-NEXT: S_ENDPGM implicit %2
+# GCN-NEXT: S_ENDPGM 0, implicit %2
 
 name: constant_fold_lshl_or_reg0_immreg_imm
 alignment:       0
@@ -875,7 +875,7 @@ body:             |
   %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
   %1:vgpr_32 = V_MOV_B32_e32 16, implicit $exec
   %2:vgpr_32 = V_LSHL_OR_B32 %0, %1, 10, implicit $exec
-  S_ENDPGM implicit %2
+  S_ENDPGM 0, implicit %2
 
 ...
 
@@ -883,7 +883,7 @@ body:             |
 
 # GCN-LABEL: name: constant_fold_lshl_or_reg0_immreg_immreg{{$}}
 # GCN: %3:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec, implicit $exec
-# GCN-NEXT: S_ENDPGM implicit %3
+# GCN-NEXT: S_ENDPGM 0, implicit %3
 
 name: constant_fold_lshl_or_reg0_immreg_immreg
 alignment:       0
@@ -900,6 +900,6 @@ body:             |
   %1:vgpr_32 = V_MOV_B32_e32 16, implicit $exec
   %2:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
   %3:vgpr_32 = V_LSHL_OR_B32 %0, %1, %2, implicit $exec
-  S_ENDPGM implicit %3
+  S_ENDPGM 0, implicit %3
 
 ...
index 2656bf55b036769e046c85c5fc2ebf3bc90d6a5a..3bca82be46af65026d99b91f0ef279fb9dd72a5d 100644 (file)
@@ -311,9 +311,9 @@ body:             |
     %44:vgpr_32 = V_MAD_F32 0, killed %43, 0, 0, 0, 0, 0, 0, implicit $exec
     %45:vgpr_32 = V_CVT_PKRTZ_F16_F32_e64 0, killed %44, 0, undef %46:vgpr_32, 0, 0, implicit $exec
     EXP_DONE 0, killed %45, undef %47:vgpr_32, undef %48:vgpr_32, undef %49:vgpr_32, -1, -1, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.6.DummyReturnBlock:
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 5d35265905b2a5062ad51d1948ee5c3801b1f899..522d8e165ed32694b699ddf6269e689774ea467d 100644 (file)
@@ -2,7 +2,7 @@
 
 # GCN-LABEL: name: kill_all
 # GCN:      bb.0:
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: kill_all
 tracksRegLiveness: true
 registers:
@@ -20,13 +20,13 @@ body:             |
     %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
     %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit $exec
     %4 = S_ADD_U32 %3, 1, implicit-def $scc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: load_without_memoperand
 # GCN:      $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
 # GCN-NEXT: dead %1:vgpr_32 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: load_without_memoperand
 tracksRegLiveness: true
 registers:
@@ -44,13 +44,13 @@ body:             |
     %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr
     %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit $exec
     %4 = S_ADD_U32 %3, 1, implicit-def $scc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: load_volatile
 # GCN:      $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
 # GCN-NEXT: dead %1:vgpr_32 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4)
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: load_volatile
 tracksRegLiveness: true
 registers:
@@ -68,13 +68,13 @@ body:             |
     %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4)
     %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit $exec
     %4 = S_ADD_U32 %3, 1, implicit-def $scc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: store
 # GCN:      $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
 # GCN-NEXT: FLAT_STORE_DWORD %0, %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: store
 tracksRegLiveness: true
 registers:
@@ -87,13 +87,13 @@ body:             |
     %1 = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
     FLAT_STORE_DWORD %0, %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: barrier
 # GCN:      $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
 # GCN-NEXT: S_BARRIER
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: barrier
 tracksRegLiveness: true
 body:             |
@@ -101,13 +101,13 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
     S_BARRIER
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: call
 # GCN:      $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
 # GCN-NEXT: $sgpr4_sgpr5 = S_SWAPPC_B64 $sgpr2_sgpr3
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: call
 tracksRegLiveness: true
 body:             |
@@ -115,13 +115,13 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
     $sgpr4_sgpr5 = S_SWAPPC_B64 $sgpr2_sgpr3
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: exp
 # GCN:      $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
 # GCN-NEXT: EXP 32, undef %0:vgpr_32, undef %1:vgpr_32, %2, undef %3:vgpr_32, 0, 0, 15, implicit $exec
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: exp
 tracksRegLiveness: true
 registers:
@@ -135,7 +135,7 @@ body:             |
     %2 = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
     EXP 32, undef %0, undef %1, killed %2, undef %3, 0, 0, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: return_to_epilog
@@ -156,7 +156,7 @@ body:             |
 # GCN-NEXT:   successors: %bb.1
 # GCN-NOT:  S_OR_B64
 # GCN:      bb.1:
-# GCN-NEXT:   S_ENDPGM
+# GCN-NEXT:   S_ENDPGM 0
 name: split_block
 tracksRegLiveness: true
 registers:
@@ -174,7 +174,7 @@ body:             |
     %2 = IMPLICIT_DEF
     %1 = V_ADD_F32_e64 0, killed %0, 0, 1, 0, 0, implicit $exec
     %3 = S_ADD_U32 %2, 1, implicit-def $scc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: split_block_empty_block
@@ -183,7 +183,7 @@ body:             |
 # GCN-NOT:  S_OR_B64
 # GCN:      bb.1:
 # GCN:      bb.2:
-# GCN-NEXT:   S_ENDPGM
+# GCN-NEXT:   S_ENDPGM 0
 name: split_block_empty_block
 tracksRegLiveness: true
 body:             |
@@ -194,7 +194,7 @@ body:             |
   bb.1:
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: split_block_uncond_branch
@@ -203,7 +203,7 @@ body:             |
 # GCN:        S_BRANCH %bb.1
 # GCN-NOT:  S_OR_B64
 # GCN:      bb.1:
-# GCN-NEXT:   S_ENDPGM
+# GCN-NEXT:   S_ENDPGM 0
 name: split_block_uncond_branch
 tracksRegLiveness: true
 body:             |
@@ -213,7 +213,7 @@ body:             |
     S_BRANCH %bb.1
 
   bb.1:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: split_block_cond_branch
@@ -223,7 +223,7 @@ body:             |
 # GCN:        S_CBRANCH_VCCNZ %bb.2, implicit undef $vcc
 # GCN:      bb.1:
 # GCN:      bb.2:
-# GCN-NEXT:   S_ENDPGM
+# GCN-NEXT:   S_ENDPGM 0
 name: split_block_cond_branch
 tracksRegLiveness: true
 body:             |
@@ -235,7 +235,7 @@ body:             |
   bb.1:
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: two_preds_both_dead
@@ -248,7 +248,7 @@ body:             |
 # GCN-NOT:    S_AND
 # GCN:        S_BRANCH %bb.2
 # GCN:      bb.2:
-# GCN-NEXT:   S_ENDPGM
+# GCN-NEXT:   S_ENDPGM 0
 name: two_preds_both_dead
 tracksRegLiveness: true
 body:             |
@@ -263,7 +263,7 @@ body:             |
     S_BRANCH %bb.2
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: two_preds_one_dead
@@ -277,7 +277,7 @@ body:             |
 # GCN-NOT:    S_AND
 # GCN:        S_BRANCH %bb.2
 # GCN:      bb.2:
-# GCN-NEXT:   S_ENDPGM
+# GCN-NEXT:   S_ENDPGM 0
 name: two_preds_one_dead
 tracksRegLiveness: true
 body:             |
@@ -293,14 +293,14 @@ body:             |
     S_BRANCH %bb.2
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: implicit_use_on_s_endpgm
 # GCN: V_ADD_I32
 # GCN: COPY
 # GCN: V_ADDC_U32
-# GCN: S_ENDPGM implicit %3
+# GCN: S_ENDPGM 0, implicit %3
 name: implicit_use_on_s_endpgm
 tracksRegLiveness: true
 
@@ -309,6 +309,6 @@ body:             |
     dead %0:vgpr_32 = V_ADD_I32_e32 12345, undef %1:vgpr_32, implicit-def $vcc, implicit $exec
     %2:sreg_64_xexec = COPY $vcc
     %3:vgpr_32, dead %4:sreg_64_xexec = V_ADDC_U32_e64 undef %5:vgpr_32, undef %6:vgpr_32, %2, implicit $exec
-    S_ENDPGM implicit %3
+    S_ENDPGM 0, implicit %3
 
 ...
index 617427a8d3fd0fd7d4b0cfd1219cb0123c617904..2204ae8236297952e9cf2f9e7cd16544477c92f3 100644 (file)
@@ -72,6 +72,6 @@ body:             |
     %10.sub1 = V_ADDC_U32_e32 %9.sub1, %2, implicit-def dead $vcc, implicit killed $vcc, implicit $exec
     FLAT_STORE_DWORD %9, %5, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.gep2)
     FLAT_STORE_DWORD %10, %6, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.gep4)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 412190a8e4ff9065f757df7d7bb944e7bca7fd19..646a34b08352ff6353f8ab10b4166065ce2f8b9e 100644 (file)
@@ -162,7 +162,7 @@ body:             |
     %12 = V_MOV_B32_e32 1065353216, implicit $exec
     %13 = V_ADD_F16_e64 0, killed %11, 0, %12, 0, 0, implicit $exec
     BUFFER_STORE_SHORT_OFFSET killed %13, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -229,7 +229,7 @@ body:             |
     %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $exec
     BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -297,7 +297,7 @@ body:             |
     %16 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $exec
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_DWORD_OFFSET killed %16, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -370,7 +370,7 @@ body:             |
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -434,7 +434,7 @@ body:             |
     %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $exec
     BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -504,7 +504,7 @@ body:             |
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -571,7 +571,7 @@ body:             |
     %15 = V_ADD_F32_e64 0, %12, 0, %13, 0, 0, implicit $exec
     BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
     BUFFER_STORE_DWORD_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -638,7 +638,7 @@ body:             |
     %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $exec
     BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -704,6 +704,6 @@ body:             |
     %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $exec
     BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
     BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index f3a1168885f8a8f408fcf0b7cce1b3c27c0da372..c749dcb9e68d4f34cd87e2465aee134c4015c59c 100644 (file)
@@ -15,14 +15,14 @@ body:             |
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
     ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY killed $vcc
-    ; GCN: S_ENDPGM implicit [[COPY]]
+    ; GCN: S_ENDPGM 0, implicit [[COPY]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32 = IMPLICIT_DEF
     %3:vgpr_32 = IMPLICIT_DEF
 
     %4:vgpr_32, %5:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %5
+    S_ENDPGM 0, implicit %5
 
 ...
 ---
@@ -38,7 +38,7 @@ body:             |
     ; GCN: [[DEF1:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; 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
     ; 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
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_1]], implicit [[V_ADD_I32_e64_2]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_1]], implicit [[V_ADD_I32_e64_2]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32 = IMPLICIT_DEF
@@ -47,7 +47,7 @@ body:             |
 
     %5:vgpr_32, %6:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
     %7:vgpr_32, %8:sreg_64_xexec = V_ADD_I32_e64 %0, %2, implicit $exec
-    S_ENDPGM implicit %6, implicit %7
+    S_ENDPGM 0, implicit %6, implicit %7
 
 ...
 ---
@@ -64,7 +64,7 @@ body:             |
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
     ; GCN: DBG_VALUE %5:sreg_64_xexec, $noreg
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32 = IMPLICIT_DEF
@@ -72,7 +72,7 @@ body:             |
 
     %4:vgpr_32, %5:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
     DBG_VALUE %5, $noreg
-    S_ENDPGM implicit %4
+    S_ENDPGM 0, implicit %4
 
 ...
 
@@ -93,7 +93,7 @@ body:             |
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
     ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY killed $vcc
     ; 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
-    ; GCN: S_ENDPGM implicit [[V_ADDC_U32_e64_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADDC_U32_e64_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32 = IMPLICIT_DEF
@@ -101,6 +101,6 @@ body:             |
 
     %4:vgpr_32, %5:sreg_64_xexec = V_ADD_I32_e64 %0, %1, implicit $exec
     %6:vgpr_32, %7:sreg_64_xexec = V_ADDC_U32_e64 %2, %3, %5, implicit $exec
-    S_ENDPGM implicit %6
+    S_ENDPGM 0, implicit %6
 
 ...
index 847c2b720cd4e4f5c6f1cd671d182ceb8219546d..c241e4fed96de7f81116da750196b92adb78f114 100644 (file)
@@ -12,11 +12,11 @@ body:             |
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -31,11 +31,11 @@ body:             |
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
     %0:vgpr_32 = IMPLICIT_DEF
     %1:sreg_32_xm0 = S_MOV_B32 12345
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 ---
@@ -49,11 +49,11 @@ body:             |
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 ---
@@ -71,11 +71,11 @@ body:             |
     ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
     ; GCN: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
     ; 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
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]]
     %0:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
     %1:sreg_32_xm0 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -90,11 +90,11 @@ body:             |
     ; GCN: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
     ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
     ; 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
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]]
     %0:sreg_32_xm0 = IMPLICIT_DEF
     %1:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -110,12 +110,12 @@ body:             |
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; 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
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc
     $vcc = S_MOV_B64 -1
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2, implicit $vcc
+    S_ENDPGM 0, implicit %2, implicit $vcc
 
 ...
 
@@ -134,7 +134,7 @@ body:             |
   ; 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
   ; GCN: bb.1:
   ; GCN:   liveins: $vcc
-  ; GCN:   S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc
+  ; GCN:   S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc
   bb.0:
     successors: %bb.1
     $vcc = S_MOV_B64 -1
@@ -144,7 +144,7 @@ body:             |
 
   bb.1:
     liveins: $vcc
-    S_ENDPGM implicit %2, implicit $vcc
+    S_ENDPGM 0, implicit %2, implicit $vcc
 
 ...
 ---
@@ -161,7 +161,7 @@ body:             |
   ; 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
   ; GCN: bb.1:
   ; GCN:   liveins: $vcc_lo
-  ; GCN:   S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
+  ; GCN:   S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
   bb.0:
     successors: %bb.1
     $vcc = S_MOV_B64 -1
@@ -171,7 +171,7 @@ body:             |
 
   bb.1:
     liveins: $vcc_lo
-    S_ENDPGM implicit %2, implicit $vcc_lo
+    S_ENDPGM 0, implicit %2, implicit $vcc_lo
 
 ...
 ---
@@ -191,7 +191,7 @@ body:             |
   ; GCN:   [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
   ; GCN:   [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
   ; 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
-  ; GCN:   S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
+  ; GCN:   S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
   bb.0:
     successors: %bb.1
     $vcc = S_MOV_B64 -1
@@ -201,7 +201,7 @@ body:             |
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2, implicit $vcc_lo
+    S_ENDPGM 0, implicit %2, implicit $vcc_lo
 
 ...
 ---
@@ -222,7 +222,7 @@ body:             |
   ; 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
   ; GCN: bb.2:
   ; GCN:   liveins: $vcc_hi
-  ; GCN:   S_ENDPGM implicit [[V_ADD_I32_e64_]], implicit $vcc_hi
+  ; GCN:   S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_hi
   bb.0:
     successors: %bb.1
     $vcc_hi = S_MOV_B32 -1
@@ -236,7 +236,7 @@ body:             |
   bb.2:
     liveins: $vcc_hi
 
-    S_ENDPGM implicit %2, implicit $vcc_hi
+    S_ENDPGM 0, implicit %2, implicit $vcc_hi
 
 ...
 
@@ -251,11 +251,11 @@ body:             |
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[V_SUBREV_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_SUBREV_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_SUBREV_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_SUB_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -270,11 +270,11 @@ body:             |
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[V_SUB_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_SUB_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_SUB_I32_e32_]]
     %0:vgpr_32 = IMPLICIT_DEF
     %1:sreg_32_xm0 = S_MOV_B32 12345
     %2:vgpr_32, %3:sreg_64 = V_SUB_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -289,11 +289,11 @@ body:             |
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[V_SUB_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_SUB_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_SUB_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     %2:vgpr_32, %3:sreg_64 = V_SUBREV_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -308,11 +308,11 @@ body:             |
     ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
     ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
     ; GCN: [[V_SUBREV_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_SUBREV_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_SUBREV_I32_e32_]]
     %0:vgpr_32 = IMPLICIT_DEF
     %1:sreg_32_xm0 = S_MOV_B32 12345
     %2:vgpr_32, %3:sreg_64 = V_SUBREV_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -331,7 +331,7 @@ body:             |
   ; GCN:   [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
   ; GCN:   [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
   ; GCN: bb.1:
-  ; GCN:   S_ENDPGM implicit [[V_ADD_I32_e32_]]
+  ; GCN:   S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
   bb.0:
     successors: %bb.1
 
@@ -372,7 +372,7 @@ body:             |
     S_NOP 0
 
   bb.1:
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 
@@ -392,7 +392,7 @@ body:             |
   ; GCN:   [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
   ; GCN:   [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
   ; GCN: bb.1:
-  ; GCN:   S_ENDPGM implicit [[V_ADD_I32_e32_]]
+  ; GCN:   S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
   bb.0:
     successors: %bb.1
 
@@ -404,7 +404,7 @@ body:             |
     S_NOP 0
 
   bb.1:
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 ---
@@ -449,7 +449,7 @@ body:             |
     ; GCN: DBG_VALUE $noreg, 0
     ; GCN: DBG_VALUE $noreg, 0
     ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     DBG_VALUE $noreg, 0
@@ -481,7 +481,7 @@ body:             |
     DBG_VALUE $noreg, 0
     DBG_VALUE $noreg, 0
     %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
 ---
@@ -526,7 +526,7 @@ body:             |
     ; GCN: DBG_VALUE $noreg, 0
     ; GCN: DBG_VALUE $noreg, 0
     ; GCN: DBG_VALUE $noreg, 0
-    ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+    ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
     %0:sreg_32_xm0 = S_MOV_B32 12345
     %1:vgpr_32 = IMPLICIT_DEF
     S_NOP 0
@@ -587,6 +587,6 @@ body:             |
     DBG_VALUE $noreg, 0
     DBG_VALUE $noreg, 0
     $vcc = S_MOV_B64 0
-    S_ENDPGM implicit %2
+    S_ENDPGM 0, implicit %2
 
 ...
index d37964af76f2009008813cf1260fc26a8e1ed913..1396ad6d7370f4beb6e729e623a6092fd14cad6c 100644 (file)
@@ -67,7 +67,7 @@ body:             |
     %24 = V_MAC_F32_e64 0, killed %19, 0, killed %21, 0, %23, 1, 0, implicit $exec
     %26 = COPY %29
     BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -138,7 +138,7 @@ body:             |
     %24 = V_MAC_F32_e64 0, killed %19, 0, killed %21, 0, %23, 0, 2, implicit $exec
     %26 = COPY %29
     BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -209,7 +209,7 @@ body:             |
     %24 = V_MAD_F32 0, killed %19, 0, killed %21, 0, %23, 1, 0, implicit $exec
     %26 = COPY %29
     BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -280,6 +280,6 @@ body:             |
     %24 = V_MAD_F32 0, killed %19, 0, killed %21, 0, %23, 0, 1, implicit $exec
     %26 = COPY %29
     BUFFER_STORE_DWORD_ADDR64 killed %24, %26, killed %18, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 4dec859f0bad3b6f526f2e1f30baabbce6b2e7ee..fbd921dac9aadeed25d94297a07d287da27aa1bf 100644 (file)
@@ -4,11 +4,11 @@
 # implicit use
 
 # CHECK: %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
-# CHECK-NEXT: S_ENDPGM implicit %0
+# CHECK-NEXT: S_ENDPGM 0, implicit %0
 name: fold_imm_implicit_operand
 body:             |
   bb.0:
     %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
-    S_ENDPGM implicit %0
+    S_ENDPGM 0, implicit %0
 
 ...
index fa84f9282e4ea045a616e305e9e1c05e308926f8..1a0bdbd1b276e2fa74851441e82ba691c38775eb 100644 (file)
@@ -35,6 +35,6 @@ body:             |
     %4 = V_AND_B32_e64 killed %2, killed %3, implicit $exec
     %5 = IMPLICIT_DEF
     BUFFER_STORE_DWORD_OFFSET killed %4, killed %5, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 8ac7c3e14a172d337e706fd662208de6474f4ff8..468b111c213794ed5f1dacb41a8984972284a45c 100644 (file)
@@ -245,5 +245,5 @@ body:             |
     GLOBAL_STORE_DWORDX2 %11, %78, 0, 0, 0, implicit $exec :: (volatile store 4 into `i32 addrspace(1)* undef`, addrspace 1)
     GLOBAL_ATOMIC_CMPSWAP_X2 %11, %80, 16, 0, implicit $exec :: (volatile load store seq_cst 4, addrspace 1)
 
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 64436b7e30e7ecf95ef1766d79a30aeca91cca82..19eff49cd8f85d2fc00d710e81fa7885169f5e0d 100644 (file)
@@ -14,6 +14,6 @@ body:             |
   
     BUFFER_STORE_DWORDX4_OFFSET_exact killed $vgpr7_vgpr8_vgpr9_vgpr10, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 96, 0, 0, 0, implicit $exec
     $vgpr7 = V_INTERP_P1_F32 $vgpr0, 0, 0, implicit $m0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 611c276e9178055c76d2e1adf17ca0c9092004fa..ac86fa8d6c83b87672652211594b97f45f20cfd4 100644 (file)
@@ -18,7 +18,7 @@ body: |
   bb.0:
    FLAT_STORE_DWORDX4 $vgpr49_vgpr50, $vgpr26_vgpr27_vgpr28_vgpr29, 0, 0, 0, implicit $exec, implicit $flat_scr
    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
-   S_ENDPGM
+   S_ENDPGM 0
 ...
 
 
index e8fc8834881292e59a87bd22b0814ea7b305b7e1..7fa4f353f15eec68f0c4e8cc36342fe08b0cceb2 100644 (file)
@@ -27,6 +27,6 @@ body:             |
     renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $m0, implicit $exec
     renamable $sgpr0 = S_MOV_B32 0
 
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 605231d08ced844d04293ecfe300944727ecf1ef..80fa69b8d6b75fb319da79f1ae4cb725a60a51e5 100644 (file)
@@ -81,7 +81,7 @@ body: |
     $vgpr5 = IMPLICIT_DEF
     $vgpr6 = IMPLICIT_DEF
     S_SENDMSG 3, implicit $exec, implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: hazard-lookahead-dbg-value
@@ -102,7 +102,7 @@ body: |
     DBG_VALUE 5
     DBG_VALUE 6
     S_SENDMSG 3, implicit $exec, implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: hazard-lookahead-dbg-label
@@ -123,5 +123,5 @@ body: |
     DBG_LABEL 5
     DBG_LABEL 6
     S_SENDMSG 3, implicit $exec, implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 9427b5cd25420fac63ce0749c6efd11166bc11e4..6390d21416672a61a79f819be02919fee7fc12e9 100644 (file)
@@ -17,7 +17,7 @@ body:             |
     $sgpr0_sgpr1 = S_MOV_B64 -1
     $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_imm_vccz
@@ -34,7 +34,7 @@ body:             |
   bb.2:
     $vcc = S_AND_B64 $exec, -1, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execnz_imm_vccnz
@@ -51,7 +51,7 @@ body:             |
   bb.2:
     $vcc = S_AND_B64 $exec, -1, implicit-def dead $scc
     S_CBRANCH_VCCNZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_imm_vccz_live_scc
@@ -68,7 +68,7 @@ body:             |
   bb.2:
     $vcc = S_AND_B64 $exec, -1, implicit-def $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_live_scc
@@ -87,7 +87,7 @@ body:             |
     $sgpr0_sgpr1 = S_MOV_B64 -1
     $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_live_sreg
@@ -105,7 +105,7 @@ body:             |
     $sgpr0_sgpr1 = S_MOV_B64 -1
     $vcc = S_AND_B64 $exec, $sgpr0_sgpr1, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_live_sreg_commute
@@ -123,7 +123,7 @@ body:             |
     $sgpr0_sgpr1 = S_MOV_B64 -1
     $vcc = S_AND_B64 $sgpr0_sgpr1, $exec, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_live_scc_commute
@@ -142,7 +142,7 @@ body:             |
     $sgpr0_sgpr1 = S_MOV_B64 -1
     $vcc = S_AND_B64 killed $sgpr0_sgpr1, $exec, implicit-def $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_commute
@@ -161,12 +161,12 @@ body:             |
     $sgpr0_sgpr1 = S_MOV_B64 -1
     $vcc = S_AND_B64 killed $sgpr0_sgpr1, $exec, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_exec_vccz
 # GCN:      $exec = S_MOV_B64 -1
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name:            and_execz_mov_exec_vccz
 body:             |
   bb.0:
@@ -179,7 +179,7 @@ body:             |
     $exec = S_MOV_B64 -1
     $vcc = S_AND_B64 $exec, $exec, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_exec_vccnz
@@ -197,7 +197,7 @@ body:             |
     $exec = S_MOV_B64 -1
     $vcc = S_AND_B64 $exec, $exec, implicit-def dead $scc
     S_CBRANCH_VCCNZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_reads_sreg_early
@@ -217,7 +217,7 @@ body:             |
     $sgpr2 = S_MOV_B32 $sgpr1
     $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_reads_sreg_late
@@ -237,7 +237,7 @@ body:             |
     $vcc = S_AND_B64 $exec, $sgpr0_sgpr1, implicit-def dead $scc
     $sgpr2 = S_MOV_B32 $sgpr1
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 # GCN-LABEL: name: and_execz_mov_vccz_reads_writes_sreg_early
 # GCN:      $sgpr0_sgpr1 = S_MOV_B64 -1
@@ -257,7 +257,7 @@ body:             |
     $sgpr1 = S_MOV_B32 $sgpr0
     $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_reads_cond
@@ -277,7 +277,7 @@ body:             |
     $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
     $sgpr2 = S_MOV_B32 $vcc_lo
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_mov_vccz_modifies_sreg
@@ -298,13 +298,13 @@ body:             |
     $sgpr0 = S_MOV_B32 0
     $vcc = S_AND_B64 $exec, killed $sgpr0_sgpr1, implicit-def dead $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_execz_imm_vccz_liveout_scc
 # GCN:      $vcc = S_AND_B64 $exec, -1, implicit-def $scc
 # GCN-NEXT: S_CBRANCH_EXECZ %bb.1, implicit $exec
-# GCN-NEXT  S_ENDPGM implicit $scc
+# GCN-NEXT  S_ENDPGM 0, implicit $scc
 name:            and_execz_imm_vccz_liveout_scc
 body:             |
   bb.0:
@@ -316,5 +316,5 @@ body:             |
   bb.2:
     $vcc = S_AND_B64 $exec, -1, implicit-def $scc
     S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
-    S_ENDPGM implicit $scc
+    S_ENDPGM 0, implicit $scc
 ...
index c842d849580faa87d64b6508cb4509491105f2f0..bcc6e12d4ee781096760060944d37da3f010f675 100644 (file)
 
 # CHECK: bb.3:
 # CHECK-NEXT: EXP_DONE
-# CHECK: S_ENDPGM
+# CHECK: S_ENDPGM 0
 
 # CHECK: bb.2:
-# CHECK: S_ENDPGM
+# CHECK: S_ENDPGM 0
 
 name: kill_uncond_branch
 
@@ -37,4 +37,4 @@ body: |
     S_BRANCH %bb.2
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
index d84618679337c1f9c33fce8a2176de697633a39e..3a5297e09ba367b7f668aac8b47fb3e23587c45e 100644 (file)
@@ -95,7 +95,7 @@ body: |
   bb.3:
     $vgpr4, $vcc = V_DIV_SCALE_F32 $vgpr1, $vgpr1, $vgpr3, implicit $exec
     $vgpr0 = V_DIV_FMAS_F32 0, $vgpr1, 0, $vgpr2, 0, $vgpr3, 0, 0, implicit $vcc, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -146,7 +146,7 @@ body: |
   bb.3:
     S_SETREG_B32 $sgpr0, 0
     $sgpr1 = S_GETREG_B32 1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 ...
@@ -185,7 +185,7 @@ body: |
   bb.2:
     S_SETREG_B32 $sgpr0, 1
     S_SETREG_B32 $sgpr1, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 ...
@@ -257,7 +257,7 @@ body: |
     $vgpr3 = V_MOV_B32_e32 0, implicit $exec
     FLAT_ATOMIC_FCMPSWAP_X2 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5, 0, 0, implicit $exec, implicit $flat_scr
     $vgpr3 = V_MOV_B32_e32 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -319,7 +319,7 @@ body: |
   bb.3:
     $vgpr0,implicit $vcc = V_ADD_I32_e32 $vgpr1, $vgpr2, implicit $vcc, implicit $exec
     $vgpr4 = V_WRITELANE_B32 $sgpr4, $vcc_lo, $vgpr4
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -348,7 +348,7 @@ body: |
   bb.1:
     S_SETREG_B32 $sgpr0, 0
     S_RFE_B64 $sgpr2_sgpr3
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -377,7 +377,7 @@ body: |
   bb.1:
     $sgpr0 = S_MOV_FED_B32 $sgpr0
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -427,7 +427,7 @@ body: |
   bb.3:
     $m0 = S_MOV_B32 0
     $sgpr0_sgpr1 = S_MOVRELD_B64 $sgpr0_sgpr1, implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 ...
@@ -476,7 +476,7 @@ body: |
   bb.3:
     $m0 = S_MOV_B32 0
     $vgpr0 = V_INTERP_MOV_F32 0, 0, 0, implicit $m0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 ...
@@ -510,7 +510,7 @@ body: |
   bb.1:
     implicit $exec, implicit $vcc = V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit $exec
     $vgpr3 = V_MOV_B32_dpp $vgpr3, $vgpr0, 0, 15, 15, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 name:            mov_fed_hazard_crash_on_dbg_value
@@ -557,6 +557,6 @@ body:             |
     $sgpr8 = S_MOV_B32 $sgpr4, implicit killed $sgpr4_sgpr5
     $vgpr0 = V_MOV_B32_e32 killed $sgpr8, implicit $exec
     BUFFER_STORE_DWORD_OFFSET $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr9, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.A.addr)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index b88b50ac9fab300ed0a0ad7e73a1a10dae27f694..09aab15c7d808348fe07cef61fd74411451a9382 100644 (file)
@@ -81,6 +81,6 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index a1521b75b2e307353179452573057bc400f60d94..5582a4f93fd4ca4739b883328a911014e211b17c 100644 (file)
@@ -110,7 +110,7 @@ body:             |
     liveins: $sgpr2_sgpr3
 
     $exec = S_OR_B64 $exec, killed $sgpr2_sgpr3, implicit-def $scc
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
index 18bdd4c47dbe1c8984755a2b50a49eb21d400fb3..44af0f65ab3f25ce81ab694344d9cb06f6119def 100644 (file)
@@ -15,7 +15,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -31,7 +31,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -48,7 +48,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $exec
     $vgpr2 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -64,6 +64,6 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr3, implicit $exec, implicit $sgpr2_sgpr3, implicit $exec
     $vgpr2 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 6713937f08e2801c570329c61194a56cf0d374d6..ffaab97174fde60a33fc0518d4c43d55ce6c4175 100644 (file)
@@ -21,7 +21,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -45,7 +45,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -69,7 +69,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -93,7 +93,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -117,7 +117,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -141,7 +141,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -165,7 +165,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -189,7 +189,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -213,7 +213,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -237,7 +237,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -261,7 +261,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -285,7 +285,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -309,7 +309,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -333,7 +333,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -357,7 +357,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -381,7 +381,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -405,7 +405,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -429,7 +429,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -453,7 +453,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -477,7 +477,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -488,7 +488,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_unordered
 body:             |
@@ -499,7 +499,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -510,7 +510,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_monotonic
 body:             |
@@ -521,7 +521,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -532,7 +532,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_release
 body:             |
@@ -543,7 +543,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -554,7 +554,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_seq_cst
 body:             |
@@ -565,7 +565,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -576,7 +576,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_unordered
 body:             |
@@ -587,7 +587,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -598,7 +598,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_monotonic
 body:             |
@@ -609,7 +609,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -620,7 +620,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_release
 body:             |
@@ -631,7 +631,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -642,7 +642,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_seq_cst
 body:             |
@@ -653,7 +653,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -664,7 +664,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_unordered
 body:             |
@@ -675,7 +675,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -686,7 +686,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_monotonic
 body:             |
@@ -697,7 +697,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -708,7 +708,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_release
 body:             |
@@ -719,7 +719,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -730,7 +730,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_seq_cst
 body:             |
@@ -741,7 +741,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -752,7 +752,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_unordered
 body:             |
@@ -763,7 +763,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -774,7 +774,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_monotonic
 body:             |
@@ -785,7 +785,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -796,7 +796,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_release
 body:             |
@@ -807,7 +807,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -818,7 +818,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_seq_cst
 body:             |
@@ -829,7 +829,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -840,7 +840,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_unordered
 body:             |
@@ -851,7 +851,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store unordered 4 into `i32 addrspace(3)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -862,7 +862,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_monotonic
 body:             |
@@ -873,7 +873,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store monotonic 4 into `i32 addrspace(3)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -884,7 +884,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_release
 body:             |
@@ -895,7 +895,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store release 4 into `i32 addrspace(3)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -906,7 +906,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_seq_cst
 body:             |
@@ -917,7 +917,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -928,7 +928,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_unordered
 body:             |
@@ -939,7 +939,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -950,7 +950,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_monotonic
 body:             |
@@ -961,7 +961,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -972,7 +972,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_acquire
 body:             |
@@ -983,7 +983,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -994,7 +994,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_release
 body:             |
@@ -1005,7 +1005,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -1016,7 +1016,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_acq_rel
 body:             |
@@ -1027,7 +1027,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -1038,7 +1038,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_seq_cst
 body:             |
@@ -1049,6 +1049,6 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $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`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 59d68287e4d6f6bd8298d0603499813898fab492..5d19c6a38cd25f0ef477f9e3c4484d226c26a855 100644 (file)
@@ -60,6 +60,6 @@ body:             |
     $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
     S_WAITCNT 3952
     FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32 addrspace(1)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 77194a7416d87cca81ed98e947c40e73dca6d057..e9236e1217aa3c5f698510679e46d14eb5554c49 100644 (file)
@@ -154,6 +154,6 @@ body:             |
     $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
     S_WAITCNT 3952
     FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 39042313be9271b46b9f941666a730be19076fd9..5ac3a9ede82271b9ed0ed101d8ce1f10b791890c 100644 (file)
@@ -134,6 +134,6 @@ body:             |
     $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
     S_WAITCNT 3952
     FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into %ir.out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index ebf1c35e74f52f7ca9759369f8b3c0dcdeaad92c..2033a99804a4e211a85872d6605d88ada9206102 100644 (file)
@@ -21,7 +21,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -45,7 +45,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -69,7 +69,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -93,7 +93,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -117,7 +117,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -141,7 +141,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -165,7 +165,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -189,7 +189,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -213,7 +213,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -237,7 +237,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -261,7 +261,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -285,7 +285,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -309,7 +309,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -333,7 +333,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -357,7 +357,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -381,7 +381,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -405,7 +405,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -429,7 +429,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -453,7 +453,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -477,7 +477,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
     $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
     FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -488,7 +488,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_unordered
 body:             |
@@ -499,7 +499,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") unordered 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -510,7 +510,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_monotonic
 body:             |
@@ -521,7 +521,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") monotonic 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -532,7 +532,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_release
 body:             |
@@ -543,7 +543,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") release 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -554,7 +554,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_singlethread_seq_cst
 body:             |
@@ -565,7 +565,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") seq_cst 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -576,7 +576,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_unordered
 body:             |
@@ -587,7 +587,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") unordered 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -598,7 +598,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_monotonic
 body:             |
@@ -609,7 +609,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") monotonic 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -620,7 +620,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_release
 body:             |
@@ -631,7 +631,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") release 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -642,7 +642,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_wavefront_seq_cst
 body:             |
@@ -653,7 +653,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront") seq_cst 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -664,7 +664,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_unordered
 body:             |
@@ -675,7 +675,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") unordered 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -686,7 +686,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_monotonic
 body:             |
@@ -697,7 +697,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") monotonic 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -708,7 +708,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_release
 body:             |
@@ -719,7 +719,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") release 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -730,7 +730,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_workgroup_seq_cst
 body:             |
@@ -741,7 +741,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup") seq_cst 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -752,7 +752,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_unordered
 body:             |
@@ -763,8 +763,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("agent") unordered 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
-
+    S_ENDPGM 0
 ...
 ---
 
@@ -774,7 +773,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_monotonic
 body:             |
@@ -785,7 +784,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("agent") monotonic 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -796,7 +795,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_release
 body:             |
@@ -807,7 +806,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("agent") release 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -818,7 +817,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_agent_seq_cst
 body:             |
@@ -829,7 +828,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("agent") seq_cst 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -840,7 +839,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_unordered
 body:             |
@@ -851,7 +850,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store unordered 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -862,7 +861,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_monotonic
 body:             |
@@ -873,7 +872,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store monotonic 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -884,7 +883,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_release
 body:             |
@@ -895,7 +894,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store release 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -906,7 +905,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRITE_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            store_system_seq_cst
 body:             |
@@ -917,7 +916,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store seq_cst 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -928,7 +927,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_unordered
 body:             |
@@ -939,7 +938,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") unordered 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -950,7 +949,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_monotonic
 body:             |
@@ -961,7 +960,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") monotonic 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -972,7 +971,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_acquire
 body:             |
@@ -983,7 +982,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") acquire 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -994,7 +993,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_release
 body:             |
@@ -1005,7 +1004,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") release 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -1016,7 +1015,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_acq_rel
 body:             |
@@ -1027,7 +1026,7 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") acq_rel 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -1038,7 +1037,7 @@ body:             |
 # GCN-NOT:   S_WAITCNT
 # GCN:       DS_WRXCHG_RTN_B32
 # GCN-NOT:   S_WAITCNT
-# GCN:       S_ENDPGM
+# GCN:       S_ENDPGM 0
 
 name:            atomicrmw_singlethread_seq_cst
 body:             |
@@ -1049,6 +1048,6 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
     $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
     $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 1, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread") seq_cst 4 into `i32 addrspace(2)* undef`)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index cab91c555fec1a83bffd20e3cd1f6b39bc686970..30d2fbf18159fac1c7a02fe2c83733a484c6f7ed 100644 (file)
@@ -366,7 +366,7 @@ body:             |
 # GCN-NEXT: dead %3:vgpr_32 = FLAT_ATOMIC_ADD_RTN %0, %1, 0, 0, implicit $exec, implicit $flat_scr
 # GCN-NEXT: FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr
 # GCN-NEXT: FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            atomic
@@ -384,5 +384,5 @@ body:             |
     %3:vgpr_32 = FLAT_ATOMIC_ADD_RTN %0, %1, 0, 0, implicit $exec, implicit $flat_scr
     FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr
     FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index f7002cc12a67a8e85d12480c18d925a0f90720a0..766b687b7580a10d353cff70d741c968f6a1fae0 100644 (file)
@@ -62,7 +62,7 @@ body:             |
     %12:sgpr_32 = S_ADDC_U32 %10, 0, implicit-def dead $scc, implicit $scc
 
     %3:vgpr_32 = DS_READ_B32 %1, 64, 0, implicit $m0, implicit $exec :: (load 4 from %ir.ptr.64)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -111,6 +111,6 @@ body:             |
     %11:sgpr_32 = S_ADDC_U32 %10, 0, implicit-def dead $scc, implicit $scc
 
     %3:vgpr_32 = DS_READ_B32 %1, 64, 0, implicit $m0, implicit $exec :: (load 4 from %ir.ptr.64)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index fb705b872a534a104f85448a97053050e6716ef6..b4d4662803642951709032ad5caba50a1b5f4835 100644 (file)
@@ -73,7 +73,7 @@ body:             |
     S_BRANCH %bb.2
 
   bb.1:
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2:
     %1:sreg_64_xexec = V_CMP_NE_U32_e64 %0, 0, implicit $exec
@@ -108,7 +108,7 @@ body:             |
     S_BRANCH %bb.2
 
   bb.1:
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2:
     %1:sreg_64_xexec = V_CMP_NE_U32_e64 %0.sub0, 0, implicit $exec
@@ -139,7 +139,7 @@ body:             |
     S_BRANCH %bb.2
 
   bb.1:
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2:
     %1:sreg_64_xexec = V_CMP_NE_U32_e64 %0.sub0, 0, implicit $exec
index 1fcbd60b68864b0359c06936c5e6180c2994a3f8..cfa3b99bc2c0b30223c7082318804d62ad2017d8 100644 (file)
@@ -100,7 +100,7 @@ body:             |
     %4:vgpr_32 = DS_READ_B32 %1, 4, 0, implicit $m0, implicit $exec :: (load 4 from %ir.ptr.4)
     %5:vgpr_32 = V_ADD_I32_e32 killed %3, killed %4, implicit-def $vcc, implicit $exec
     DS_WRITE_B32 killed %1, %5, 0, 0, implicit killed $m0, implicit $exec :: (store 4 into %ir.ptr.0)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
index 0c58042d5082a79f960b8a2e8a9dce992cbe61f0..0595edf894ca9bd48e0fc2dac3a4e2aa3f2138a3 100644 (file)
@@ -23,7 +23,7 @@ body: |
     $vgpr2 = V_MOV_B32_e32 $sgpr10, implicit $exec, implicit $sgpr8_sgpr9_sgpr10_sgpr11
     $vgpr3 = V_MOV_B32_e32 $sgpr11, implicit $exec, implicit $sgpr8_sgpr9_sgpr10_sgpr11, implicit $exec
     S_NOP 0, implicit killed $sgpr6_sgpr7, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 # CHECK-LABEL: name: func0
 # CHECK-DAG: $sgpr10 = S_MOV_B32 5
@@ -42,4 +42,4 @@ body: |
 # CHECK: $vgpr2 = V_MOV_B32_e32 $sgpr10, implicit $exec, implicit $sgpr8_sgpr9_sgpr10_sgpr11
 # CHECK: $vgpr3 = V_MOV_B32_e32 killed $sgpr11, implicit $exec, implicit $sgpr8_sgpr9_sgpr10_sgpr11, implicit $exec
 # CHECK: S_NOP 0, implicit killed $sgpr6_sgpr7, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3
-# CHECK: S_ENDPGM
+# CHECK: S_ENDPGM 0
index bf06a01d4c3c5685507bff8ca14c457a0867ea55..a6324410b488832ebb5fc0aeed99c6e9c04bba34 100644 (file)
@@ -23,7 +23,7 @@ body: |
     $vgpr1 = V_INTERP_P2_F16 0, $vgpr2, 2, 1, 0, killed $vgpr1, 0, 0, implicit $m0, implicit $exec
     $vgpr0 = V_INTERP_P2_F16 0, killed $vgpr2, 2, 1, 0, killed $vgpr0, -1, 0, implicit $m0, implicit $exec
     $vgpr0 = V_ADD_F16_e32 killed $vgpr1, killed $vgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that the mode is not changed for interp f16 when the mode is already RTZ
@@ -49,7 +49,7 @@ body: |
     $vgpr1 = V_INTERP_P2_F16 0, $vgpr2, 2, 1, 0, killed $vgpr1, 0, 0, implicit $m0, implicit $exec
     $vgpr0 = V_INTERP_P2_F16 0, killed $vgpr2, 2, 1, 0, killed $vgpr0, -1, 0, implicit $m0, implicit $exec
     $vgpr0 = V_ADD_F16_e32 killed $vgpr1, killed $vgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that explicit RTN mode change is registered
@@ -75,7 +75,7 @@ body: |
     $vgpr0 = V_INTERP_P2_F16 0, killed $vgpr2, 2, 1, 0, killed $vgpr0, -1, 0, implicit $m0, implicit $exec
     S_SETREG_IMM32_B32 0, 2177
     $vgpr0 = V_ADD_F16_e32 killed $vgpr1, killed $vgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that the mode is unchanged from RTN for F64 instruction
@@ -90,7 +90,7 @@ body: |
   bb.0:
     liveins: $vgpr1_vgpr2
     $vgpr1_vgpr2 = V_FRACT_F64_e32 killed $vgpr1_vgpr2, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that the mode is changed from RTZ to RTN for F64 instruction
@@ -108,7 +108,7 @@ body: |
     liveins: $vgpr1_vgpr2
     S_SETREG_IMM32_B32 3, 2177
     $vgpr1_vgpr2 = V_FRACT_F64_e32 killed $vgpr1_vgpr2, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # CHECK-LABEL: name: rtz_from_rtn
@@ -127,7 +127,7 @@ body: |
 
   bb.1:
     $vgpr1 = V_INTERP_P1LL_F16 0, $vgpr0, 2, 1, 0, 0, 0, implicit $m0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that the mode is changed from RTZ to RTN for F64 instruction
@@ -157,7 +157,7 @@ body: |
     $vgpr3_vgpr4 = V_FRACT_F64_e32 killed $vgpr3_vgpr4, implicit $exec
     $vgpr0 = V_INTERP_P2_F16 0, killed $vgpr2, 2, 1, 0, killed $vgpr0, -1, 0, implicit $m0, implicit $exec
     $vgpr0 = V_ADD_F16_e32 killed $sgpr0, killed $vgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that an explicit change to the single precision mode has no effect
@@ -187,7 +187,7 @@ body: |
     $vgpr3_vgpr4 = V_FRACT_F64_e32 killed $vgpr3_vgpr4, implicit $exec
     $vgpr0 = V_INTERP_P2_F16 0, killed $vgpr2, 2, 1, 0, killed $vgpr0, -1, 0, implicit $m0, implicit $exec
     $vgpr0 = V_ADD_F16_e32 killed $sgpr0, killed $vgpr0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that mode is propagated back to start of loop - first instruction is RTN but needs
@@ -223,7 +223,7 @@ body: |
     S_BRANCH %bb.3
 
   bb.3:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # two back-edges to same node with different modes
@@ -272,7 +272,7 @@ body: |
     S_BRANCH %bb.6
 
   bb.6:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that mode is propagated back to start of loop and through a block that
@@ -311,7 +311,7 @@ body: |
     S_BRANCH %bb.4
 
   bb.4:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that multiple mode values are propagated to a block that uses the mode
@@ -346,7 +346,7 @@ body: |
     S_BRANCH %bb.4
 
   bb.4:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that multiple mode values are propagated through a block that neither
@@ -387,7 +387,7 @@ body: |
     S_BRANCH %bb.5
 
   bb.5:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # CHECK-LABEL: name: pass_through_blocks
@@ -420,7 +420,7 @@ body: |
 
   bb.4:
     $vgpr1 = V_INTERP_P1LL_F16 0, $vgpr0, 2, 1, 0, 0, 0, implicit $m0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # check that multiple mode values are propagated
@@ -455,5 +455,5 @@ body: |
     S_BRANCH %bb.4
 
   bb.4:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 84e34f394734ac100e8f8fb80dda5f50cda5d44d..c5575b2b7387ed0811ea3f5b1e8b90c6dd80f731 100644 (file)
@@ -26,6 +26,6 @@ body:             |
     $vgpr1 = V_MOVRELS_B32_e32 undef $vgpr1, implicit $m0, implicit $exec, implicit killed $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8
     $vgpr4 = V_MAC_F32_e32 undef $vgpr0, undef $vgpr0, undef $vgpr4, implicit $exec
     EXP_DONE 15, undef $vgpr0, killed $vgpr1, killed $vgpr4, undef $vgpr0, 0, 0, 12, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 861cdda8ad6f781418b264629156c8fa3b251aac..b53813a3d917cb662271bf9fb6229de7e1f36712 100644 (file)
@@ -21,7 +21,7 @@
 # GCN-LABEL: name: omod_inst_flag_nsz_src
 # GCN: %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
 # GCN-NEXT: %1:vgpr_32 = V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
-# GCN-NEXT: S_ENDPGM implicit %1
+# GCN-NEXT: S_ENDPGM 0, implicit %1
 name: omod_inst_flag_nsz_src
 tracksRegLiveness: true
 
@@ -31,14 +31,14 @@ body:             |
 
   %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
   %1:vgpr_32 = V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
-  S_ENDPGM implicit %1
+  S_ENDPGM 0, implicit %1
 
 ...
 ---
 
 # GCN-LABEL: name: omod_inst_flag_nsz_result
 # GCN: %0:vgpr_32 = V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1, implicit $exec
-# GCN-NEXT: S_ENDPGM implicit %0
+# GCN-NEXT: S_ENDPGM 0, implicit %0
 
 name: omod_inst_flag_nsz_result
 tracksRegLiveness: true
@@ -49,14 +49,14 @@ body:             |
 
   %0:vgpr_32 = V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
   %1:vgpr_32 = nsz V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
-  S_ENDPGM implicit %1
+  S_ENDPGM 0, implicit %1
 ...
 
 ---
 
 # GCN-LABEL: name: omod_inst_flag_nsz_both
 # GCN: %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1, implicit $exec
-# GCN-NEXT: S_ENDPGM implicit %0
+# GCN-NEXT: S_ENDPGM 0, implicit %0
 
 name: omod_inst_flag_nsz_both
 tracksRegLiveness: true
@@ -67,5 +67,5 @@ body:             |
 
   %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
   %1:vgpr_32 = nsz V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
-  S_ENDPGM implicit %1
+  S_ENDPGM 0, implicit %1
 ...
index 4511fddaa6a4b9bc19f325d7a1fffd73ed5f1756..2cf13ee35b66a008f9a11847c6d9de739f9a298b 100644 (file)
@@ -141,7 +141,7 @@ body:             |
 
   bb.2.bb2:
     SI_END_CF %1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -247,7 +247,7 @@ body:             |
 
   bb.2.bb2:
     SI_END_CF %1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -336,6 +336,6 @@ body:             |
 
   bb.2.bb2:
     SI_END_CF %1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index f8a7b229c61b4446ed5e4c8e6b608069c5d67c81..c66ccf9da175215d218140de63073f4de64839c3 100644 (file)
@@ -160,7 +160,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -197,7 +197,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -234,7 +234,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -275,7 +275,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -313,7 +313,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -357,7 +357,7 @@ body:             |
     $sgpr2 = S_MOV_B32 -1
     $sgpr3 = S_MOV_B32 61440
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -396,7 +396,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -435,7 +435,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -472,7 +472,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -509,7 +509,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -548,5 +548,5 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 61e6f44348706a31a04741f410b706483d8fc728..9851321c0a1acacb1f6ac2d7e49155861e4d9ab5 100644 (file)
@@ -19,7 +19,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3
@@ -41,7 +41,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_redef_vcc1
@@ -67,7 +67,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_redef_vcc2
@@ -93,7 +93,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_redef_cmp
@@ -119,7 +119,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_undef_vcc
@@ -137,7 +137,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_imp_vcc
@@ -159,7 +159,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_imp_vcc
@@ -181,7 +181,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_redef_sel
@@ -207,7 +207,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_used_sel
@@ -231,7 +231,7 @@ body:             |
 
   bb.2:
     $vgpr0 = COPY %1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_used_vcc
@@ -257,7 +257,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_sel_wrong_subreg1
@@ -283,7 +283,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_sel_wrong_subreg2
@@ -309,7 +309,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_sel_right_subreg1
@@ -333,7 +333,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_sel_right_subreg2
@@ -357,7 +357,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop3_sel_subreg_overlap
@@ -383,7 +383,7 @@ body:             |
     S_BRANCH %bb.0
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_dominated_blocks
@@ -407,7 +407,7 @@ body:             |
     S_BRANCH %bb.1
 
   bb.3:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_different_blocks_cmp_and
@@ -431,7 +431,7 @@ body:             |
     S_BRANCH %bb.1
 
   bb.3:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN: name: negated_cond_vop2_not_dominated_blocks
@@ -461,5 +461,5 @@ body:             |
     S_BRANCH %bb.2
 
   bb.4:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index fb22963bc97448f0326aa7d8735c2f8336a107b0..f6264476fff8630dcf502e6befe560c11a0e61a0 100644 (file)
@@ -3,7 +3,7 @@
 ---
 # GCN-LABEL: name: reduce_and_saveexec
 # GCN:      $exec = S_AND_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_and_saveexec
 tracksRegLiveness: true
 body:             |
@@ -11,12 +11,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_and_saveexec_commuted
 # GCN:      $exec = S_AND_B64 killed $vcc, $exec
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_and_saveexec_commuted
 tracksRegLiveness: true
 body:             |
@@ -24,7 +24,7 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_AND_B64 killed $vcc, $exec, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_and_saveexec_liveout
@@ -37,12 +37,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_AND_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: and_saveexec
 # GCN:      $sgpr0_sgpr1 = S_AND_SAVEEXEC_B64 $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: and_saveexec
 tracksRegLiveness: true
 body:             |
@@ -51,12 +51,12 @@ body:             |
     $sgpr0_sgpr1 = COPY $exec
     $sgpr2_sgpr3 = S_AND_B64 $sgpr0_sgpr1, killed $vcc, implicit-def $scc
     $exec = S_MOV_B64_term $sgpr2_sgpr3
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_or_saveexec
 # GCN:      $exec = S_OR_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_or_saveexec
 tracksRegLiveness: true
 body:             |
@@ -64,12 +64,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_OR_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_xor_saveexec
 # GCN:      $exec = S_XOR_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_xor_saveexec
 tracksRegLiveness: true
 body:             |
@@ -77,12 +77,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_XOR_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_andn2_saveexec
 # GCN:      $exec = S_ANDN2_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_andn2_saveexec
 tracksRegLiveness: true
 body:             |
@@ -90,12 +90,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_ANDN2_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_orn2_saveexec
 # GCN:      $exec = S_ORN2_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_orn2_saveexec
 tracksRegLiveness: true
 body:             |
@@ -103,12 +103,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_ORN2_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_nand_saveexec
 # GCN:      $exec = S_NAND_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_nand_saveexec
 tracksRegLiveness: true
 body:             |
@@ -116,12 +116,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_NAND_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_nor_saveexec
 # GCN:      $exec = S_NOR_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_nor_saveexec
 tracksRegLiveness: true
 body:             |
@@ -129,12 +129,12 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_NOR_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # GCN-LABEL: name: reduce_xnor_saveexec
 # GCN:      $exec = S_XNOR_B64 $exec, killed $vcc
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 name: reduce_xnor_saveexec
 tracksRegLiveness: true
 body:             |
@@ -142,6 +142,6 @@ body:             |
     $vcc = IMPLICIT_DEF
     $sgpr0_sgpr1 = S_XNOR_B64 $exec, killed $vcc, implicit-def $scc
     $exec = COPY killed $sgpr0_sgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
index edddd5067c96044730e052b26a84596cad23f31c..f11d9de70556aaedb160f7630e41ef833cccf606 100644 (file)
@@ -234,6 +234,6 @@ body:             |
   bb.34:
 
   bb.35:
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index ed528670167a882306f8e90ebcca124c85acd56a..aedb2aa5775be99b106c49762757b55fa5f26ec6 100644 (file)
@@ -157,6 +157,6 @@ body:             |
 
   bb.4:
     EXP 32, undef %53, undef %54, killed %46, undef %55, 0, 0, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 846607be790ebf31090ac78d882acb30f933ee0f..bf261c4c136bdc2bb7abe613f8b781349d435bd8 100644 (file)
@@ -14,7 +14,7 @@ body:             |
   ; CHECK:   %0.sub1:sreg_64_xexec = COPY %0.sub0
   ; CHECK:   S_BRANCH %bb.2
   ; CHECK: bb.2:
-  ; CHECK:   S_ENDPGM implicit %0
+  ; CHECK:   S_ENDPGM 0, implicit %0
   bb.0:
     successors: %bb.1
 
@@ -29,7 +29,7 @@ body:             |
 
   bb.2:
     dead %2:sreg_32_xm0 = COPY %0.sub0:sreg_64_xexec
-    S_ENDPGM implicit killed %1
+    S_ENDPGM 0, implicit killed %1
 
 ...
 ---
@@ -40,11 +40,11 @@ body:             |
     ; CHECK-LABEL: name: couldnt_join_subrange_no_implicit_def_inst
     ; CHECK: undef %0.sub0:sreg_64 = S_MOV_B32 0
     ; CHECK: %0.sub1:sreg_64 = COPY %0.sub0
-    ; CHECK: S_ENDPGM implicit %0.sub1
+    ; CHECK: S_ENDPGM 0, implicit %0.sub1
     undef %0.sub0:sreg_64 = S_MOV_B32 0
     %1:sreg_64 = COPY %0:sreg_64
     %0.sub1:sreg_64 = COPY %0.sub0:sreg_64
-    S_ENDPGM implicit %1.sub1:sreg_64
+    S_ENDPGM 0, implicit %1.sub1:sreg_64
 
 ...
 ---
@@ -59,7 +59,7 @@ body:             |
   ; CHECK:   %0.sub0:sreg_64 = S_MOV_B32 0
   ; CHECK:   [[COPY:%[0-9]+]]:sreg_64 = COPY %0
   ; CHECK:   dead %0.sub1:sreg_64 = COPY %0.sub0
-  ; CHECK:   S_ENDPGM implicit [[COPY]].sub1
+  ; CHECK:   S_ENDPGM 0, implicit [[COPY]].sub1
   bb.0:
     successors: %bb.1
     undef %0.sub1:sreg_64 = S_MOV_B32 -1
@@ -68,7 +68,7 @@ body:             |
     %0.sub0:sreg_64 = S_MOV_B32 0
     %1:sreg_64 = COPY %0:sreg_64
     dead %0.sub1:sreg_64 = COPY %0.sub0:sreg_64
-    S_ENDPGM implicit %1.sub1:sreg_64
+    S_ENDPGM 0, implicit %1.sub1:sreg_64
 
 ...
 ---
@@ -82,13 +82,13 @@ body:             |
     ; CHECK: %0.sub1:sreg_64_xexec = S_MOV_B32 0
     ; CHECK: S_NOP 0, implicit %0.sub1
     ; CHECK: S_NOP 0, implicit %0
-    ; CHECK: S_ENDPGM
+    ; CHECK: S_ENDPGM 0
     undef %0.sub0:sreg_64_xexec = S_MOV_B32 0
     %1:sreg_64 = COPY %0
     %0.sub1:sreg_64_xexec = S_MOV_B32 0
     S_NOP 0, implicit %0.sub1
     S_NOP 0, implicit %1
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -102,7 +102,7 @@ body:             |
   ; CHECK:   %0.sub1:sreg_64_xexec = COPY %0.sub0
   ; CHECK: bb.1:
   ; CHECK:   S_NOP 0, implicit %0.sub1
-  ; CHECK:   S_ENDPGM implicit %0
+  ; CHECK:   S_ENDPGM 0, implicit %0
   bb.0:
     successors: %bb.1
 
@@ -113,6 +113,6 @@ body:             |
   bb.1:
 
     S_NOP 0, implicit %0.sub1
-    S_ENDPGM implicit %1
+    S_ENDPGM 0, implicit %1
 
 ...
index d69bbda463c9d683cf63ea926902147c4ca10765..24ee55193959e76dff4846c38af7c36beb2d8f46 100644 (file)
@@ -71,6 +71,6 @@ body:             |
     %20 = V_LSHL_B64 killed %19, 2, implicit $exec
     %16 = COPY killed %5
     BUFFER_STORE_DWORD_ADDR64 killed %16, killed %20, killed %13, 0, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index f7a9915a19888f6861b98ddee1ff973aa74997e9..dc66e6641ebc6e372e976f4bf27d4885c02cf7ac 100644 (file)
@@ -16,7 +16,7 @@ body:             |
   ; CHECK:   %0.sub0:sreg_64 = S_MOV_B32 0
   ; CHECK:   [[COPY:%[0-9]+]]:sreg_64 = COPY %0
   ; CHECK:   dead %0.sub1:sreg_64 = COPY %0.sub0
-  ; CHECK:   S_ENDPGM implicit [[COPY]].sub1
+  ; CHECK:   S_ENDPGM 0, implicit [[COPY]].sub1
   bb.0:
     successors: %bb.1
     undef %0.sub1:sreg_64 = IMPLICIT_DEF
@@ -25,7 +25,7 @@ body:             |
     %0.sub0:sreg_64 = S_MOV_B32 0
     %1:sreg_64 = COPY %0:sreg_64
     dead %0.sub1:sreg_64 = COPY %0.sub0:sreg_64
-    S_ENDPGM implicit %1.sub1:sreg_64
+    S_ENDPGM 0, implicit %1.sub1:sreg_64
 
 ...
 ---
@@ -43,7 +43,7 @@ body:             |
   ; CHECK:   %0.sub0:sreg_64 = S_MOV_B32 0
   ; CHECK:   [[COPY:%[0-9]+]]:sreg_64 = COPY %0
   ; CHECK:   dead %0.sub1:sreg_64 = COPY %0.sub0
-  ; CHECK:   S_ENDPGM implicit [[COPY]].sub1
+  ; CHECK:   S_ENDPGM 0, implicit [[COPY]].sub1
   bb.0:
     successors: %bb.1
     undef %0.sub1:sreg_64 = S_MOV_B32 -1
@@ -52,6 +52,6 @@ body:             |
     %0.sub0:sreg_64 = S_MOV_B32 0
     %1:sreg_64 = COPY %0:sreg_64
     dead %0.sub1:sreg_64 = COPY %0.sub0:sreg_64
-    S_ENDPGM implicit %1.sub1:sreg_64
+    S_ENDPGM 0, implicit %1.sub1:sreg_64
 
 ...
index 675d399885322dd8310ae2c6edb89a4bae738998..96bc78cbbd5458579b148ff0b76653b5bcb0fcad 100644 (file)
@@ -27,5 +27,5 @@ body: |
 
   bb.3:
     %3 : vgpr_32 = V_CVT_F32_I32_e32 killed %6.sub1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 8b79667c1db25faef633d68408db8c3e42cba2e0..b9131c71dc5911e0865c99216f59ef190a394943 100644 (file)
@@ -191,9 +191,9 @@ body:             |
     S_BRANCH %bb.29
   
   bb.33:
-    S_ENDPGM
+    S_ENDPGM 0
   
   bb.34:
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 976e45dceac1b3eb63dc897834973ea37328d7b1..1dbf5de271500a135b57f638b96acd07d2dbe1c9 100644 (file)
@@ -64,7 +64,7 @@ body:             |
     undef %15.sub0 = COPY killed %16
     %15.sub1 = COPY killed %14
     FLAT_STORE_DWORDX2 undef %11, killed %15, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
index e3e736f725fd19b234917b8667ca7343137a64e9..23974fe0849af74e5059f34df962cca2e193542a 100644 (file)
@@ -49,7 +49,7 @@
 # CHECK: bb.0:
 # CHECK-NEXT: S_STORE_DWORD
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 name: basic_insert_dcache_wb
 tracksRegLiveness: false
@@ -57,7 +57,7 @@ tracksRegLiveness: false
 body: |
   bb.0:
     S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Already has an explicitly requested flush after the last store.
@@ -65,7 +65,7 @@ body: |
 # CHECK: bb.0:
 # CHECK-NEXT: S_STORE_DWORD
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 name: explicit_flush_after
 tracksRegLiveness: false
@@ -74,7 +74,7 @@ body: |
   bb.0:
     S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0
     S_DCACHE_WB
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # Already has an explicitly requested flush before the last store.
@@ -83,7 +83,7 @@ body: |
 # CHECK-NEXT: S_DCACHE_WB
 # CHECK-NEXT: S_STORE_DWORD
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 name: explicit_flush_before
 tracksRegLiveness: false
@@ -92,30 +92,30 @@ body: |
   bb.0:
     S_DCACHE_WB
     S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # CHECK-LABEL: no_scalar_store
 # CHECK: bb.0
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 name: no_scalar_store
 tracksRegLiveness: false
 
 body: |
   bb.0:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # CHECK-LABEL: name: multi_block_store
 # CHECK: bb.0:
 # CHECK-NEXT: S_STORE_DWORD
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 # CHECK: bb.1:
 # CHECK-NEXT: S_STORE_DWORD
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 name: multi_block_store
 tracksRegLiveness: false
@@ -123,11 +123,11 @@ tracksRegLiveness: false
 body: |
   bb.0:
     S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.1:
     S_STORE_DWORD_SGPR undef $sgpr4, undef $sgpr6_sgpr7, undef $m0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ...
 
@@ -137,23 +137,23 @@ body: |
 # CHECK-LABEL: name: one_block_store
 # CHECK: bb.0:
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 # CHECK: bb.1:
 # CHECK-NEXT: S_STORE_DWORD
 # CHECK-NEXT: S_DCACHE_WB
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 name: one_block_store
 tracksRegLiveness: false
 
 body: |
   bb.0:
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.1:
     S_STORE_DWORD_SGPR undef $sgpr4, undef $sgpr6_sgpr7, undef $m0, 0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # CHECK-LABEL: name: si_return
index 3d52f5aad04c2561c5bdfb27a0c774f5f99a8cd6..f2ef02861a664eb9adcb289dba509a31f01ac990 100644 (file)
@@ -329,6 +329,6 @@ body:             |
     dead $sgpr30_sgpr31 = SI_CALL %127, @func, csr_amdgpu_highregs, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4, implicit $vgpr0, implicit $vgpr1_vgpr2, implicit killed $vgpr3
     ADJCALLSTACKDOWN 0, 0, implicit-def $sgpr32, implicit $sgpr32
     %128:vreg_64, dead %129:sreg_64 = V_MAD_I64_I32 %20, %34, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 537880acba3bf84d667076cc0612e9f4ba7a0a4c..7dc3899391f15b9cacdbe47e3a45d8f30da1a731 100644 (file)
@@ -52,6 +52,6 @@ body:             |
     %7 = COPY %5
     %6 = DS_READ_B32 %7, 0, 0, implicit $m0, implicit $exec
     DS_WRITE_B32 %7, %6, 4, 0, implicit killed $m0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 7263baade0248a101766bdc7f6b76f118271bd3c..582add0c56ae59d5a02dde07bcd2783f937a8c3a 100644 (file)
@@ -96,7 +96,7 @@ body:             |
     %11:vgpr_32 = V_AND_B32_e64 %3, killed %10, implicit $exec
     %17:vgpr_32 = V_MOV_B32_sdwa 0, %4, 0, 5, 2, 4, implicit $exec, implicit %11(tied-def 0)
     FLAT_STORE_DWORD %0, %17, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -139,6 +139,6 @@ body:             |
     %11:vgpr_32 = V_AND_B32_e64 %3, killed %10, implicit $exec
     %17:vgpr_32 = V_MOV_B32_sdwa 0, %4, 0, 5, 2, 4, implicit $exec, implicit %11(tied-def 0)
     FLAT_STORE_DWORD %0, %17, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index e257db259a41cc495e54771ca9ad7f2f7468a909..69a5ecf17f69434c40cfa82c20ed6d1e876be99a 100644 (file)
@@ -210,7 +210,7 @@ body:             |
     S_BRANCH %bb.2.bb2
 
   bb.1.bb1:
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2.bb2:
     successors: %bb.1.bb1(0x04000000), %bb.2.bb2(0x7c000000)
@@ -373,7 +373,7 @@ body:             |
     S_BRANCH %bb.2.bb2
 
   bb.1.bb1:
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2.bb2:
     successors: %bb.1.bb1(0x04000000), %bb.2.bb2(0x7c000000)
index 3da95048794bb7612d082cfb8572dea1c9aee096..de09ab341f61e41d41e8598e012ccd94847db964 100644 (file)
@@ -15,7 +15,7 @@ body: |
   bb.0:
     $m0 = S_MOV_B32 -1
     S_SENDMSG 3, implicit $exec, implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -30,7 +30,7 @@ body: |
   bb.0:
     $m0 = S_MOV_B32 -1
     S_SENDMSGHALT 3, implicit $exec, implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -45,5 +45,5 @@ body: |
   bb.0:
     $m0 = S_MOV_B32 -1
     S_TTRACEDATA implicit $m0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index cd25fc34e7848d7093ca5031200d594e20b731e6..30da2ec1ab52d835f940e821eb21652438536b47 100644 (file)
@@ -86,7 +86,7 @@ body:             |
     %29, %9 = V_ADD_I32_e64 %19, %17, implicit $exec
     %24 = V_CNDMASK_B32_e64 0, 1, killed %9, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 %24, %28, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -170,7 +170,7 @@ body:             |
     %29, %9 = V_SUB_I32_e64 %19, %17, implicit $exec
     %24 = V_CNDMASK_B32_e64 0, 1, killed %9, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 %24, %28, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -254,7 +254,7 @@ body:             |
     %29, %9 = V_SUBREV_I32_e64 %19, %17, implicit $exec
     %24 = V_CNDMASK_B32_e64 0, 1, killed %9, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 %29, %28, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -338,7 +338,7 @@ body:             |
     %29, $vcc = V_ADDC_U32_e64 %19, %17, %9, implicit $exec
     %24 = V_CNDMASK_B32_e64 0, 1, killed $vcc, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 %24, %28, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -423,7 +423,7 @@ body:             |
     %29, $vcc = V_ADDC_U32_e64 %19, %17, $vcc, implicit $exec
     %24 = V_CNDMASK_B32_e64 0, 1, killed $vcc, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 %24, %28, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -507,6 +507,6 @@ body:             |
     %29, $vcc = V_ADDC_U32_e64 %19, %17, undef $vcc, implicit $exec
     %24 = V_CNDMASK_B32_e64 0, 1, killed $vcc, implicit $exec
     BUFFER_STORE_DWORD_ADDR64 %24, %28, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 94b6055741773a23a1d2e24462b5cd14b10beae1..3ec7a6678a9ed53d4b4966ea4de6b979d10a929a 100644 (file)
@@ -42,7 +42,7 @@ body: |
 # GCN-LABEL: name: dead_illegal_virtreg_copy
 # GCN: %0:vgpr_32 = COPY $vgpr0
 # GCN: %1:sreg_32_xm0 = IMPLICIT_DEF
-# GCN: S_ENDPGM implicit %0
+# GCN: S_ENDPGM 0, implicit %0
 
 name: dead_illegal_virtreg_copy
 tracksRegLiveness: true
@@ -52,7 +52,7 @@ body: |
     liveins: $vgpr0
     %0:vgpr_32 = COPY $vgpr0
     %1:sreg_32_xm0 = COPY %0
-    S_ENDPGM implicit %1
+    S_ENDPGM 0, implicit %1
 ...
 
 ---
@@ -60,7 +60,7 @@ body: |
 # GCN-LABEL: name: dead_illegal_physreg_copy
 # GCN %2:vgpr_32 = COPY $vgpr0
 # GCN: %1:sreg_32_xm0 = IMPLICIT_DEF
-# GCN: S_ENDPGM implicit %2
+# GCN: S_ENDPGM 0, implicit %2
 
 name: dead_illegal_physreg_copy
 tracksRegLiveness: true
@@ -70,5 +70,5 @@ body: |
     liveins: $vgpr0
     %0:sreg_32_xm0 = COPY $vgpr0
     %1:sreg_32_xm0 = COPY %0
-    S_ENDPGM implicit %1
+    S_ENDPGM 0, implicit %1
 ...
index 3a1914c7936730ea6d46b84edd8f3c51f3d02071..5ae4620157d7b5c606c89c674cc2070e4d2bed73 100644 (file)
@@ -13,12 +13,12 @@ body: |
     ; GCN: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 16, 0
     ; GCN: [[S_AND_B32_:%[0-9]+]]:sreg_32_xm0 = S_AND_B32 [[S_LOAD_DWORD_IMM]], 255, implicit-def $scc
     ; GCN: [[S_AND_B32_1:%[0-9]+]]:sreg_32_xm0 = S_AND_B32 65535, [[S_AND_B32_]], implicit-def $scc
-    ; GCN: S_ENDPGM
+    ; GCN: S_ENDPGM 0
     %0:sgpr_64 = COPY $sgpr4_sgpr5
     %1:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM %0, 16, 0
     %2:sreg_32_xm0 = S_AND_B32 %1, 255, implicit-def $scc
     %3:sreg_32_xm0 = S_AND_B32 65535, %2, implicit-def $scc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 ---
@@ -37,7 +37,7 @@ body:             |
   ; GCN: bb.1:
   ; GCN:   successors: %bb.2(0x80000000)
   ; GCN: bb.2:
-  ; GCN:   S_ENDPGM
+  ; GCN:   S_ENDPGM 0
   bb.0:
     successors: %bb.1, %bb.2
 
@@ -48,6 +48,6 @@ body:             |
     successors: %bb.2
 
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 2906259fb46cf176b30f01f2b2418eb538c82555..a18fecadcd31169a73a0b5563e325aec7b148b5b 100644 (file)
@@ -40,7 +40,7 @@ body:             |
     %8:sreg_64_xexec = S_BUFFER_LOAD_DWORDX2_IMM %3, 640, 0 :: (dereferenceable invariant load 8)
     undef %9.sub0:vreg_128 = V_LSHL_ADD_U32 %6, 4, %4, implicit $exec
     %9.sub1:vreg_128 = V_LSHL_ADD_U32 %5, 4, %0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
index 26228dfb1c34e200d1cb2f3dd8f3a3fd439ee5fb..68f6ec79a39c92564faf9b0ba5a9c640d7addbf8 100644 (file)
@@ -278,5 +278,5 @@ body: |
     %68:vgpr_32 = V_MUL_F32_e32 0, %4, implicit $exec
     %69:vgpr_32 = V_CVT_PKRTZ_F16_F32_e64 0, undef %70:vgpr_32, 0, %68, 0, 0, implicit $exec
     EXP 0, undef %71:vgpr_32, %69, undef %72:vgpr_32, undef %73:vgpr_32, -1, -1, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index d3c1ad6465d943104376296192e10113b051b79e..5e727138963aec481ef7fb57adeaa1b57977594d 100644 (file)
@@ -74,7 +74,7 @@ body:             |
     liveins: $vgpr0, $vgpr1, $vgpr2, $sgpr2_sgpr3, $sgpr4_sgpr5
 
     $vcc = COPY $vgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -138,6 +138,6 @@ body:             |
     liveins: $vgpr0, $vgpr1, $vgpr2, $sgpr2_sgpr3, $sgpr4_sgpr5
 
     $vcc = COPY $vgpr1
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index f0ce14bb9ddc726c49097e01c2202b92c9eb9c39..6e3aaa98b1f083580c0cc4c30b7d201a290d52db 100644 (file)
@@ -93,7 +93,7 @@ body:             |
     $vgpr0 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
     $vgpr1 = V_MOV_B32_e32 0, implicit $exec
     $vgpr1 = V_MOV_B32_e32 killed $vgpr2, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_copy_condense
@@ -176,7 +176,7 @@ body:             |
 # GCN-NEXT: %3:vgpr_32 = COPY %0
 # GCN-NEXT: %0:vgpr_32 = COPY %1
 # GCN-NEXT: %1:vgpr_32 = COPY %2
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            swap_virt_read_x
@@ -193,7 +193,7 @@ body:             |
     %3 = COPY %0
     %0 = COPY %1
     %1 = COPY %2
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_read_t_twice
@@ -203,7 +203,7 @@ body:             |
 # GCN-NEXT: %2:vgpr_32 = COPY %0
 # GCN-NEXT: %3:vgpr_32 = COPY %2
 # GCN-NEXT: %0:vgpr_32, %1:vgpr_32 = V_SWAP_B32 %1, %0, implicit $exec
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            swap_virt_read_t_twice
@@ -220,7 +220,7 @@ body:             |
     %3 = COPY %2
     %0 = COPY %1
     %1 = COPY %2
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_clobber_y
@@ -231,7 +231,7 @@ body:             |
 # GCN-NEXT: %0:vgpr_32 = COPY %1
 # GCN-NEXT: %1:vgpr_32 = IMPLICIT_DEF
 # GCN-NEXT: %1:vgpr_32 = COPY %2
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            swap_virt_clobber_y
@@ -247,7 +247,7 @@ body:             |
     %0 = COPY %1
     %1 = IMPLICIT_DEF
     %1 = COPY %2
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_clobber_x1
@@ -258,7 +258,7 @@ body:             |
 # GCN-NEXT: %0:vgpr_32 = COPY %1
 # GCN-NEXT: %0:vgpr_32 = IMPLICIT_DEF
 # GCN-NEXT: %1:vgpr_32 = COPY %2
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            swap_virt_clobber_x1
@@ -274,7 +274,7 @@ body:             |
     %0 = COPY %1
     %0 = IMPLICIT_DEF
     %1 = COPY %2
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_clobber_x2
@@ -285,7 +285,7 @@ body:             |
 # GCN-NEXT: %0:vgpr_32 = IMPLICIT_DEF
 # GCN-NEXT: %0:vgpr_32 = COPY %1
 # GCN-NEXT: %1:vgpr_32 = COPY %2
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            swap_virt_clobber_x2
@@ -301,7 +301,7 @@ body:             |
     %0 = IMPLICIT_DEF
     %0 = COPY %1
     %1 = COPY %2
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_clobber_t
@@ -312,7 +312,7 @@ body:             |
 # GCN-NEXT: %0:vgpr_32 = COPY %1
 # GCN-NEXT: %2:vgpr_32 = IMPLICIT_DEF
 # GCN-NEXT: %1:vgpr_32 = COPY %2
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 
 ---
 name:            swap_virt_clobber_t
@@ -328,7 +328,7 @@ body:             |
     %0 = COPY %1
     %2 = IMPLICIT_DEF
     %1 = COPY %2
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_copy_subreg_overlap_x_full
@@ -453,7 +453,7 @@ body:             |
 # GCN-NEXT: %1:vreg_128 = IMPLICIT_DEF
 # GCN-NEXT: %0.sub0:vreg_128, %1.sub0:vreg_128 = V_SWAP_B32 %1.sub0, %0.sub0, implicit $exec
 # GCN-NEXT: %0.sub1:vreg_128, %1.sub1:vreg_128 = V_SWAP_B32 %1.sub1, %0.sub1, implicit $exec
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 ---
 name:            swap_virt_b128_sub0_1
 registers:
@@ -467,7 +467,7 @@ body:             |
     %2.sub0_sub1 = COPY %0.sub0_sub1
     %0.sub0_sub1 = COPY %1.sub0_sub1
     %1.sub0_sub1 = COPY %2.sub0_sub1
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 # GCN-LABEL: name: swap_virt_b128_sub2_3
@@ -476,7 +476,7 @@ body:             |
 # GCN-NEXT: %1:vreg_128 = IMPLICIT_DEF
 # GCN-NEXT: %0.sub2:vreg_128, %1.sub2:vreg_128 = V_SWAP_B32 %1.sub2, %0.sub2, implicit $exec
 # GCN-NEXT: %0.sub3:vreg_128, %1.sub3:vreg_128 = V_SWAP_B32 %1.sub3, %0.sub3, implicit $exec
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 ---
 name:            swap_virt_b128_sub2_3
 registers:
@@ -490,7 +490,7 @@ body:             |
     %2.sub2_sub3 = COPY %0.sub2_sub3
     %0.sub2_sub3 = COPY %1.sub2_sub3
     %1.sub2_sub3 = COPY %2.sub2_sub3
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 
 
@@ -544,7 +544,7 @@ body:             |
 # GCN-NEXT: %0.sub0:vreg_64 = COPY %1.sub0, implicit %0
 # GCN-NEXT: %0.sub1:vreg_64 = COPY %1.sub1
 # GCN-NEXT: %1.sub0:vreg_64 = COPY %2.sub0
-# GCN-NEXT: S_ENDPGM
+# GCN-NEXT: S_ENDPGM 0
 ---
 name:            swap_virt_copy_subreg_impuse_x
 registers:
@@ -560,5 +560,5 @@ body:             |
     %0.sub0 = COPY %1.sub0, implicit %0
     %0.sub1 = COPY %1.sub1
     %1.sub0 = COPY %2.sub0
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index edcdf4cb62923503515ccb41845b2aff9bc9b14d..1a0625173e587be11c3872f792f26f54891b5be0 100644 (file)
@@ -105,7 +105,7 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 ---
@@ -166,6 +166,6 @@ body:             |
     $sgpr3 = S_MOV_B32 61440
     $sgpr2 = S_MOV_B32 -1
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 5a511bd830ce87c99c2d49ba6d202647567cb5a4..7215c63e38716195fd396b80f183401eab40f37a 100644 (file)
@@ -51,7 +51,7 @@ body:             |
     %0 = V_MOV_B32_e32 %stack.0.alloca, implicit $exec
     %1 = IMPLICIT_DEF
     %2, $vcc = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 # GCN-LABEL: name: fold_vgpr_fi{{$}}
@@ -72,7 +72,7 @@ body:             |
     %0 = V_MOV_B32_e32 %stack.0.alloca, implicit $exec
     %1 = IMPLICIT_DEF
     %2, $vcc = V_ADD_I32_e64 %1, %0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 # GCN-LABEL: name: fold_sgpr_fi{{$}}
@@ -94,7 +94,7 @@ body:             |
     %0 = V_MOV_B32_e32 %stack.0.alloca, implicit $exec
     %1 = IMPLICIT_DEF
     %2, $vcc = V_ADD_I32_e64 %1, %0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 # GCN-LABEL: name: fold_fi_sgpr{{$}}
@@ -116,7 +116,7 @@ body:             |
     %0 = V_MOV_B32_e32 %stack.0.alloca, implicit $exec
     %1 = IMPLICIT_DEF
     %2, $vcc = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 # TODO: Should probably prefer folding immediate first
 # GCN-LABEL: name: fold_fi_imm{{$}}
@@ -137,7 +137,7 @@ body:             |
     %0 = V_MOV_B32_e32 %stack.0.alloca, implicit $exec
     %1 = V_MOV_B32_e32 999, implicit $exec
     %2, $vcc = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 # GCN-LABEL: name: fold_imm_fi{{$}}
@@ -158,4 +158,4 @@ body:             |
     %0 = V_MOV_B32_e32 %stack.0.alloca, implicit $exec
     %1 = V_MOV_B32_e32 999, implicit $exec
     %2, $vcc = V_ADD_I32_e64 %1, %0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
index fa1d52008ea1921089a13fc969b32f3a7640b11f..9a581480c23b882f9794dcb78d8396ad74ed66cf 100644 (file)
@@ -17,7 +17,7 @@ body:             |
     %0 = V_MOV_B32_e32 123, implicit $exec
     %1 = V_MOV_B32_e32 456, implicit $exec
     %2, $vcc = V_ADD_I32_e64 %0, %1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 # GCN-LABEL: name: fold_partially_defined_superreg{{$}}
@@ -35,6 +35,6 @@ body:             |
     undef %3.sub0 = V_MOV_B32_e32 123, implicit $exec, implicit-def %3
     %1 = V_MOV_B32_e32 456, implicit $exec
     %2, $vcc = V_ADD_I32_e64 %3.sub0, %1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 2d495d862794a72b056dc66d5927c7f524c19e33..5dc6ca5ab4b14420fcd45d9fdeb295c24ae34114 100644 (file)
@@ -55,7 +55,7 @@ body:             |
 
     $vgpr4 = V_MAC_F32_e32 killed $vgpr0, killed $vgpr3, killed $vgpr4, implicit $exec
     EXP_DONE 12, killed $vgpr4, undef $vgpr0, undef $vgpr0, undef $vgpr0, 0, 0, 15, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 
@@ -89,5 +89,5 @@ body: |
 
   bb.6:
     S_CBRANCH_SCC1 %bb.0, implicit $scc
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 7afb2ba89c191a315f563f5953498f8d26ac8e0e..312a44532d00c23584878a34f4d61c5299692c0a 100644 (file)
@@ -48,7 +48,7 @@ body:             |
 
   bb.4:
 
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
 
@@ -67,7 +67,7 @@ body:             |
 # GCN: BUFFER_ATOMIC_ADD_OFFSET_RTN
 # GCN: S_WAITCNT 3952
 # GCN: FLAT_STORE_DWORD
-# GCN: S_ENDPGM
+# GCN: S_ENDPGM 0
 name: irreducible_loop_extended
 
 body: |
@@ -99,5 +99,5 @@ body: |
 
   bb.6:
     FLAT_STORE_DWORD $vgpr3_vgpr4, $vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 1067d4775c59bd6cf988fef58fe4fa6e13b6d34e..85fbd4308df911fbf1585a238ec22a1134df1fae 100644 (file)
@@ -22,5 +22,5 @@ body: |
     $vgpr11 = GLOBAL_LOAD_DWORD $vgpr11_vgpr12, 0, 0, 0, implicit $exec
     S_CBRANCH_SCC1 %bb.1, implicit $scc
   bb.2:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 211e8bce939353abc04c02cfce7e8e26db7ab37f..c8cd1aed91e23a60e91875e54325ce87e0a7b6f1 100644 (file)
@@ -33,5 +33,5 @@ body:             |
     $vgpr2 = V_MOV_B32_e32 $vgpr1, implicit $exec, implicit $exec
     $vgpr3 = V_MOV_B32_e32 $vgpr1, implicit $exec, implicit $exec
     IMAGE_STORE_V4_V2 killed renamable $vgpr0_vgpr1_vgpr2_vgpr3, killed renamable $vgpr0_vgpr1, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, 15, -1, 1, 0, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 211be4e6a8be3adcbf3d9fc39b2cd17e92972d07..b8f40ffa540f35930e9b87843ac7662f59765616 100644 (file)
@@ -60,7 +60,7 @@ body: |
     $vgpr0 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4 from %ir.flat4)
     $vgpr3_vgpr4_vgpr5_vgpr6 = FLAT_LOAD_DWORDX4 $vgpr7_vgpr8, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 16 from %ir.flat16)
     $vgpr0 = V_MOV_B32_e32 $vgpr1, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # There is only a single fallthrough successor block, so there's no
@@ -84,7 +84,7 @@ body: |
   bb.1:
     $vgpr3_vgpr4 = V_LSHLREV_B64 4, $vgpr7_vgpr8, implicit $exec
     FLAT_STORE_DWORD $vgpr3_vgpr4, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 # The block has a single predecessor with a single successor, but it
@@ -95,7 +95,7 @@ body: |
 
 # CHECK: bb.1
 # CHECK-NEXT: FLAT_STORE_DWORD
-# CHECK-NEXT: S_ENDPGM
+# CHECK-NEXT: S_ENDPGM 0
 
 # CHECK: bb.2:
 # CHECK-NEXT: V_LSHLREV_B64
@@ -111,10 +111,10 @@ body: |
 
   bb.1:
     FLAT_STORE_DWORD $vgpr8_vgpr9, $vgpr10, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 
   bb.2:
      $vgpr3_vgpr4 = V_LSHLREV_B64 4, $vgpr7_vgpr8, implicit $exec
     FLAT_STORE_DWORD $vgpr3_vgpr4, $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 6d8bfcb79fbc2fb2be647a2c2c6ad761c5d616cc..a93af1d54d39dc949976d93d799fb2140eb88727 100644 (file)
@@ -45,5 +45,5 @@ body: |
     $sgpr6 = S_MOV_B32 -1
     $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index f8de6a6e1a9313856a5a6fa3d268e32844996851..31efedd379609837fd64572f50e0cbd0a1ba4bac 100644 (file)
@@ -45,5 +45,5 @@ body: |
     $sgpr6 = S_MOV_B32 -1
     $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 832a61612ebd1c7f3940ab4760e628920facef60..141e26abd4f77df5a48b5691fd78bb083572128c 100644 (file)
@@ -23,6 +23,6 @@ body:             |
     %16:sgpr_128 = REG_SEQUENCE killed %vreg123_0, %subreg.sub0, %vreg123_1, %subreg.sub1, %vreg123_2, %subreg.sub2, %vreg123_3, %subreg.sub3
 
     BUFFER_STORE_DWORD_ADDR64 %vreg123_1, %27, killed %16, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index c07c0790a1e23ea7625bf3264cbc2a945b0be841..acceda391f15409a032863c5470fb97a7aca376c 100644 (file)
@@ -31,5 +31,5 @@ stack:
 
 body: |
   bb.0:
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 4102519f96199490addda2b50a06b354df37c191..41caf70e04a3ca800e7f48ce07e0be60b7226722 100644 (file)
@@ -95,6 +95,6 @@ body:             |
     $vgpr1 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit killed $sgpr4_sgpr5, implicit $sgpr4_sgpr5, implicit $exec
     $vgpr2 = V_MOV_B32_e32 killed $sgpr8, implicit $exec, implicit $exec
     FLAT_STORE_DWORD killed $vgpr0_vgpr1, killed $vgpr2, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile non-temporal store syncscope("wavefront") seq_cst 4 into %ir.wavefront_out)
-    S_ENDPGM
+    S_ENDPGM 0
 
 ...
index 569a9cf80d069ab24eb89432974a8ffbeaba2232..7b7eb6bc681daf9b32a734c042ac6d78762ca64e 100644 (file)
@@ -24,9 +24,9 @@ body: |
     ; CHECK-LABEL: name: flags
     ; CHECK: [[SI_PC_ADD_REL_OFFSET:%[0-9]+]]:sreg_64 = SI_PC_ADD_REL_OFFSET target-flags(amdgpu-rel32-lo) @foo + 4, target-flags(amdgpu-rel32-hi) @foo + 4, implicit-def dead $scc
     ; CHECK: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 target-flags(amdgpu-gotprel) @foo
-    ; CHECK: S_ENDPGM
+    ; CHECK: S_ENDPGM 0
     %0 = SI_PC_ADD_REL_OFFSET target-flags(amdgpu-rel32-lo) @foo + 4, target-flags(amdgpu-rel32-hi) @foo + 4, implicit-def dead $scc
   %1 = S_MOV_B64 target-flags(amdgpu-gotprel) @foo
 
-    S_ENDPGM
+    S_ENDPGM 0
 ...
index 713d6b69ec5f9f8d03668c49a09be77b38b847fa..f9e5157c6d2801a0deab58319f0c881a7894bb6e 100644 (file)
@@ -53,7 +53,7 @@ body: |
     $sgpr6 = S_MOV_B32 -1
     $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
 ---
 name: float2
@@ -83,5 +83,5 @@ body: |
     $sgpr6 = S_MOV_B32 -1
     $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec
     BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, implicit $exec
-    S_ENDPGM
+    S_ENDPGM 0
 ...
diff --git a/test/MC/AMDGPU/s_endpgm.s b/test/MC/AMDGPU/s_endpgm.s
new file mode 100644 (file)
index 0000000..8674a32
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=GCN
+// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -filetype=obj %s | llvm-objcopy -S -K keep_symbol - | llvm-objdump -disassemble -mcpu=gfx900 - | FileCheck %s --check-prefix=BIN
+
+// GCN: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
+// BIN: s_endpgm    // 000000000000: BF810000
+s_endpgm
+
+// GCN: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
+// BIN: s_endpgm    // 000000000004: BF810000
+s_endpgm 0
+
+  
+// GCN: s_endpgm 1 ; encoding: [0x01,0x00,0x81,0xbf]
+// BIN: s_endpgm 1  // 000000000008: BF810001
+s_endpgm 1
+  
+  
index 06aad1fb1541a2ef62edce50759b894c27afd570..fb4777898eddc6fa8a8ea931eb14a1fc89838772 100644 (file)
@@ -5,8 +5,8 @@
 
 
 # ERROR: *** Bad machine code: Using an undefined physical register ***
-# ERROR: instruction: S_ENDPGM implicit %0:vgpr_32, implicit $vcc
-# ERROR: operand 1:   implicit $vcc
+# ERROR: instruction: S_ENDPGM 0, implicit %0:vgpr_32, implicit $vcc
+# ERROR: operand 2:   implicit $vcc
 
 ...
 
@@ -16,7 +16,7 @@ tracksRegLiveness: true
 body:             |
   bb.0:
     %0:vgpr_32 = IMPLICIT_DEF
-    S_ENDPGM implicit %0, implicit $vcc
+    S_ENDPGM 0, implicit %0, implicit $vcc
 
 ...