[PATCH] D15608: AMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shaders

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 07:22:39 PST 2015


arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:133
@@ -132,4 +132,3 @@
 
-  // For non-compute shaders, the inreg attribute is used to mark inputs,
-  // which pre-loaded into SGPRs.
-  if (F->getAttributes().hasAttribute(A->getArgNo(), Attribute::InReg))
+  // For non-compute shaders, SGPR inputs are marekd with either inreg or byval.
+  if (F->getAttributes().hasAttribute(A->getArgNo() + 1, Attribute::InReg) ||
----------------
Typo marekd

================
Comment at: test/Analysis/DivergenceAnalysis/AMDGPU/kernel-args.ll:3
@@ +2,3 @@
+
+target triple = "amdgcn--"
+
----------------
This can be the -mtriple option to opt

================
Comment at: test/Analysis/DivergenceAnalysis/AMDGPU/lit.local.cfg:1
@@ +1,2 @@
+if not 'NVPTX' in config.root.targets:
+    config.unsupported = True
----------------
This should be AMDGPU


http://reviews.llvm.org/D15608





More information about the llvm-commits mailing list