[PATCH] D31786: AMDGPU/GFX9: Fix shared and private aperture queries

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 14:44:51 PDT 2017


kzhuravl added inline comments.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:2356
                                              SelectionDAG &DAG) const {
-
-  if (Subtarget->hasApertureRegs()) { // Read from Aperture Registers directly.
-    unsigned RegNo = (AS == AMDGPUASI.LOCAL_ADDRESS) ? AMDGPU::SRC_SHARED_BASE :
-                                                       AMDGPU::SRC_PRIVATE_BASE;
-    return CreateLiveInRegister(DAG, &AMDGPU::SReg_32RegClass, RegNo, MVT::i32);
+  // FIXME: Use inline constants (src_{shared, private}_base) instead.
+  if (Subtarget->hasApertureRegs()) {
----------------
arsenm wrote:
> What's wrong with using these now?
It requires a reorg in register classes, which I was planning to do in a separate patch if that is ok?


https://reviews.llvm.org/D31786





More information about the llvm-commits mailing list