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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 04:27:06 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;
+
+  // Retrieve the newly created instruction
+  MachineInstr &NewMI = *(std::prev(MII));
----------------
arsenm wrote:

Extra parens 

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


More information about the llvm-commits mailing list