[PATCH] D15764: AMDGPU/SI: Consolidate FLAT patterns

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 07:17:08 PST 2016


tstellarAMD added inline comments.

================
Comment at: lib/Target/AMDGPU/CIInstructions.td:205
@@ -240,7 +204,3 @@
 
-def useFlatForGlobal : Predicate <
-  "Subtarget->useFlatForGlobal() || "
-  "Subtarget->getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS">;
-
-let Predicates = [useFlatForGlobal] in {
+let Predicates = [isCIVI] in {
 
----------------
cfang wrote:
> Should this be [isCI] ? 
isCI selects when subtarget is >= CI, isCIVI selects when subtarget == CI || subtarget == VI.  I think we could use isCI, but I wanted to use isCIVI, in case the flat instructions change in a future chip.

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.td:147
@@ +146,3 @@
+  return isFlatLoad(dyn_cast<LoadSDNode>(N)) ||
+         isGlobalLoad(dyn_cast<LoadSDNode>(N));
+}]>;
----------------
arsenm wrote:
> Maybe needs a comment for why constant isn't included 
Constant will be added in the next commit.


http://reviews.llvm.org/D15764





More information about the llvm-commits mailing list