[PATCH] D15736: AMDGPU/SI: Select non-uniform constant addrspace loads to flat instructions for HSA

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 12:33:24 PST 2015


cfang added inline comments.

================
Comment at: lib/Target/AMDGPU/AMDGPUInstructions.td:391
@@ -390,3 +388,1 @@
-}]>;
-
 def flat_store : PatFrag<(ops node:$val, node:$ptr),
----------------
I think this def should be untouched because it is used to FLAT for real flat address.

================
Comment at: lib/Target/AMDGPU/CIInstructions.td:265
@@ -266,1 +264,3 @@
+def : FlatLoadPat <FLAT_LOAD_DWORDX2, flat_load, v2i32>;
+def : FlatLoadPat <FLAT_LOAD_DWORDX4, flat_load, v4i32>;
 
----------------
Do you think we should use "mubuf_load" here? With FlatForGlobal ON, we actually disabled SelectMUBUF. As a result, we should select FLAT for mubuf here.

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.td:149
@@ +148,3 @@
+         isFlatLoad(dyn_cast<LoadSDNode>(N));
+}]>;
+
----------------
This def here is a little confusion because it may have side effect for the general case where FlatForGlobal is OFF.


http://reviews.llvm.org/D15736





More information about the llvm-commits mailing list