[PATCH] D18218: AMDGPU: use ComplexPattern for offsets in llvm.amdgcn.buffer.load/store.format

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 14:31:25 PDT 2016


tstellarAMD added inline comments.

================
Comment at: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1136-1142
@@ +1135,9 @@
+
+  if (Overflow <= 64)
+    SOffset = CurDAG->getTargetConstant(Overflow, DL, MVT::i32);
+  else
+    SOffset = SDValue(CurDAG->getMachineNode(AMDGPU::S_MOV_B32, DL, MVT::i32,
+                      CurDAG->getTargetConstant(Overflow, DL, MVT::i32)),
+                      0);
+}
+
----------------
When the immediate is greater than 4095 + 64, if you put the overflow in ImmOffset, then when you have sequential loads they can all read the non-overflow part from the same SGPR, which would save instructions.


http://reviews.llvm.org/D18218





More information about the llvm-commits mailing list