[PATCH] D11602: AMDGPU/SI: Use ComplexPatterns for SMRD addressing modes

Matt Arsenault Matthew.Arsenault at amd.com
Wed Jul 29 11:40:42 PDT 2015


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1164-1167
@@ -1155,1 +1163,6 @@
 
+static bool isLegalSMRDImmOffset(const AMDGPUSubtarget *ST, int64_t Offset) {
+  return ST->getGeneration() < AMDGPUSubtarget::VOLCANIC_ISLANDS ?
+     isUInt<8>(Offset) : isUInt<20>(Offset);
+}
+
----------------
I don't think this is accurate for VI. On VI, these instructions are called SMEM format instead of SMRD, so the function name isn't quite right. More importantly, I thought the 20-bit offset on VI was in bytes and dwords on SI/CI.


http://reviews.llvm.org/D11602







More information about the llvm-commits mailing list