[PATCH] D17042: AMDGPU/SI: move SMRD to flat if UseFlatForGlobal is true

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 17:17:29 PST 2016


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:2366
@@ +2365,3 @@
+      if (ST.useFlatForGlobal() ||
+          ST.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS) {
+        unsigned FlatOpcode = getFlatOpFromSMRD(MI->getOpcode());
----------------
I think we should add a hasAddr64() in AMDGPUSubtarget which would return this

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:2401
@@ +2400,3 @@
+        unsigned VAddr;
+        if ( HasOffset ) { // VAddr = SBase + Offset;
+          unsigned VAddrLo = MRI.createVirtualRegister(&AMDGPU::VGPR_32RegClass);
----------------
Extra spaces around HasOffset


http://reviews.llvm.org/D17042





More information about the llvm-commits mailing list