[llvm] [AMDGPU] Add flag to force emit s_nop (PR #117839)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 01:46:25 PST 2024
================
@@ -0,0 +1,71 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
+# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 --amdgpu-snop-padding=0 --run-pass=post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GCN %s
+# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 --amdgpu-snop-padding=1 --run-pass=post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GCN-NOP1 %s
+# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 --amdgpu-snop-padding=20 --run-pass=post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GCN-NOP20 %s
+
+---
+name: waitcnt-debug-non-first-terminators
+liveins:
+machineFunctionInfo:
+ isEntryFunction: true
+body: |
+ ; GCN-LABEL: name: waitcnt-debug-non-first-terminators
+ ; GCN: bb.0:
+ ; GCN-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; GCN-NEXT: {{ $}}
+ ; GCN-NEXT: S_CBRANCH_SCC1 %bb.1, implicit $scc
+ ; GCN-NEXT: S_BRANCH %bb.2, implicit $scc
+ ; GCN-NEXT: {{ $}}
+ ; GCN-NEXT: bb.1:
+ ; GCN-NEXT: successors: %bb.2(0x80000000)
+ ; GCN-NEXT: {{ $}}
+ ; GCN-NEXT: S_NOP 0
+ ; GCN-NEXT: {{ $}}
+ ; GCN-NEXT: bb.2:
+ ; GCN-NEXT: S_NOP 0
+ ;
+ ; GCN-NOP1-LABEL: name: waitcnt-debug-non-first-terminators
+ ; GCN-NOP1: bb.0:
+ ; GCN-NOP1-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; GCN-NOP1-NEXT: {{ $}}
+ ; GCN-NOP1-NEXT: S_CBRANCH_SCC1 %bb.1, implicit $scc
+ ; GCN-NOP1-NEXT: S_BRANCH %bb.2, implicit $scc
+ ; GCN-NOP1-NEXT: {{ $}}
+ ; GCN-NOP1-NEXT: bb.1:
+ ; GCN-NOP1-NEXT: successors: %bb.2(0x80000000)
+ ; GCN-NOP1-NEXT: {{ $}}
+ ; GCN-NOP1-NEXT: S_NOP 0
+ ; GCN-NOP1-NEXT: S_NOP 0
+ ; GCN-NOP1-NEXT: {{ $}}
+ ; GCN-NOP1-NEXT: bb.2:
+ ; GCN-NOP1-NEXT: S_NOP 0
+ ; GCN-NOP1-NEXT: S_NOP 0
+ ;
+ ; GCN-NOP20-LABEL: name: waitcnt-debug-non-first-terminators
+ ; GCN-NOP20: bb.0:
+ ; GCN-NOP20-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; GCN-NOP20-NEXT: {{ $}}
+ ; GCN-NOP20-NEXT: S_CBRANCH_SCC1 %bb.1, implicit $scc
+ ; GCN-NOP20-NEXT: S_BRANCH %bb.2, implicit $scc
+ ; GCN-NOP20-NEXT: {{ $}}
+ ; GCN-NOP20-NEXT: bb.1:
+ ; GCN-NOP20-NEXT: successors: %bb.2(0x80000000)
+ ; GCN-NOP20-NEXT: {{ $}}
+ ; GCN-NOP20-NEXT: S_NOP 7
+ ; GCN-NOP20-NEXT: S_NOP 7
+ ; GCN-NOP20-NEXT: S_NOP 3
+ ; GCN-NOP20-NEXT: S_NOP 0
+ ; GCN-NOP20-NEXT: {{ $}}
+ ; GCN-NOP20-NEXT: bb.2:
+ ; GCN-NOP20-NEXT: S_NOP 7
+ ; GCN-NOP20-NEXT: S_NOP 7
+ ; GCN-NOP20-NEXT: S_NOP 3
+ ; GCN-NOP20-NEXT: S_NOP 0
+ bb.0:
+ S_CBRANCH_SCC1 %bb.1, implicit $scc
+ S_BRANCH %bb.2, implicit $scc
+ bb.1:
+ S_NOP 0
----------------
jayfoad wrote:
It's confusing having nops in the input as well as the output
https://github.com/llvm/llvm-project/pull/117839
More information about the llvm-commits
mailing list