[PATCH] D63639: [AMDGPU] Prevent backend override of WGP when using PAL

David Stuttard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 02:36:06 PDT 2019


dstuttard created this revision.
Herald added subscribers: llvm-commits, t-tye, tpr, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.

Backend defaults to setting WGP mode to 0 or 1 depending on the cumode
feature. For PAL clients we want PAL to set this mode.
Adding check to prevent the backend overriding whatever the front end has set.


Repository:
  rL LLVM

https://reviews.llvm.org/D63639

Files:
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp


Index: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -967,7 +967,11 @@
       ScratchAlignShift;
 
   if (getIsaVersion(getGlobalSTI()->getCPU()).Major >= 10) {
-    ProgInfo.WgpMode = STM.isCuModeEnabled() ? 0 : 1;
+    // Leave WgpMode as default (0) for PAL - PAL will set this bit and should
+    // not be overridden here
+    ProgInfo.WgpMode = (STM.isCuModeEnabled() ||
+                        TM.getTargetTriple().getOS() == Triple::AMDPAL)
+                           ? 0 : 1;
     ProgInfo.MemOrdered = 1;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63639.205952.patch
Type: text/x-patch
Size: 674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190621/6c0f1871/attachment.bin>


More information about the llvm-commits mailing list