[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


================
@@ -325,7 +330,9 @@ unsigned GCNHazardRecognizer::PreEmitNoops(MachineInstr *MI) {
   unsigned W = PreEmitNoopsCommon(MI);
   fixHazards(MI);
   CurrCycleInstr = nullptr;
-  return W;
+  unsigned NopPad =
+      NopPadding.getNumOccurrences() && !MI->isTerminator() ? NopPadding : 0;
----------------
jayfoad wrote:

Why don't you want nop before a terminator?

https://github.com/llvm/llvm-project/pull/117839


More information about the llvm-commits mailing list