[PATCH] D46298: AMDGPU: Remove deadcode in isSDNodeSourceOfDivergence()

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 09:52:01 PDT 2018


tstellar updated this revision to Diff 149790.
tstellar added a comment.

Completely disable isSDNodeSourceOfDivergence() for r600.


Repository:
  rL LLVM

https://reviews.llvm.org/D46298

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp


Index: lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -785,6 +785,9 @@
 bool AMDGPUTargetLowering::isSDNodeSourceOfDivergence(const SDNode * N,
   FunctionLoweringInfo * FLI, DivergenceAnalysis * DA) const
 {
+  if (getTargetMachine().getTargetTriple().getArch() == Triple::r600)
+    return false;
+
   switch (N->getOpcode()) {
     case ISD::Register:
     case ISD::CopyFromReg:
@@ -809,10 +812,7 @@
         if (MRI.isLiveIn(Reg)) {
           // workitem.id.x workitem.id.y workitem.id.z
           // Any VGPR formal argument is also considered divergent
-          if ((MRI.getLiveInPhysReg(Reg) == AMDGPU::T0_X) ||
-              (MRI.getLiveInPhysReg(Reg) == AMDGPU::T0_Y) ||
-              (MRI.getLiveInPhysReg(Reg) == AMDGPU::T0_Z) ||
-              (TRI.isVGPR(MRI, Reg)))
+          if (TRI.isVGPR(MRI, Reg))
               return true;
           // Formal arguments of non-entry functions
           // are conservatively considered divergent


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46298.149790.patch
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180604/5b348864/attachment.bin>


More information about the llvm-commits mailing list