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

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 14:55:41 PST 2015

tstellarAMD added inline comments.

Comment at: lib/Target/AMDGPU/CIInstructions.td:259-262
@@ -258,5 +258,6 @@
 def : FlatLoadPat <FLAT_LOAD_UBYTE, az_extloadi8_global, i32>;
 def : FlatLoadPat <FLAT_LOAD_SBYTE, sextloadi8_global, i32>;
 def : FlatLoadPat <FLAT_LOAD_USHORT, az_extloadi16_global, i32>;
 def : FlatLoadPat <FLAT_LOAD_SSHORT, sextloadi16_global, i32>;
+def : FlatLoadPat <FLAT_LOAD_DWORD, flat_load, i32>;
tstellarAMD wrote:
> arsenm wrote:
> > Do constant extloads need to be handled also?
> Yes.
Actually, constant extloads already work.  I've added test cases for this.


More information about the llvm-commits mailing list