[PATCH] D144313: [AMDGPU] Improve the lowering of raw_buffer_load_{i8,i16} and struct_buffer_load_{i8,i16} intrinsics

Konstantina Mitropoulou via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 19:34:32 PST 2023


kmitropoulou added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp:393
+  Register SignExtendInsnDst = MI.getOperand(0).getReg();
+  B.setInsertPt(*(MI.getParent()), MI);
+
----------------
arsenm wrote:
> The calling combiner code should really set the insert point for you, not sure why we still don't do that
I checked the combineMachineInstrs() in Combiner.cpp and it does not set an insertion point for the builder. The same happens in combine() in AMDGPUPostLegalizerCombiner.cpp . So, I assume it is intentional in case you need to add instructions at different points.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144313/new/

https://reviews.llvm.org/D144313



More information about the llvm-commits mailing list