[llvm] [AMDGPU] Extend zero initialization of return values for TFE (PR #85759)

David Stuttard via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 08:50:21 PDT 2024


================
@@ -3321,6 +3325,29 @@ bool AMDGPUInstructionSelector::selectBufferLoadLds(MachineInstr &MI) const {
   return constrainSelectedInstRegOperands(*MIB, TII, TRI, RBI);
 }
 
+bool AMDGPUInstructionSelector::selectBufferLoadTfe(MachineInstr &MI) const {
+  // Get an iterator for the current MI
+  MachineBasicBlock *MBB = MI.getParent();
+  auto MII = MachineBasicBlock::iterator(MI);
+  MII = std::next(MII);
+
+  // Standard selection works fine, use that to generate the instruction
+  if (!selectImpl(MI, *CoverageInfo))
+    return false;
----------------
dstutt wrote:

Good idea - I've re-factored to use EmitInstrWithCustomInserter.

https://github.com/llvm/llvm-project/pull/85759


More information about the llvm-commits mailing list