[llvm] [AMDGPU] Restore the default rounding mode before calls and returns (PR #222247)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 07:56:00 PDT 2026


================
@@ -211,18 +221,11 @@ getModeSetregField(const MachineInstr &MI, const SIInstrInfo *TII) {
   return std::make_pair(Offset, maskTrailingOnes<unsigned>(Width) << Offset);
 }
 
-// A mode the program asked for outlives the function and is not undone.
-static bool writesRoundMode(const MachineInstr &MI, const SIInstrInfo *TII) {
-  if (MI.getOpcode() == AMDGPU::S_ROUND_MODE)
-    return true;
-  auto Field = getModeSetregField(MI, TII);
-  return Field && (Field->second & AMDGPU::Hwreg::FP_ROUND_MASK);
-}
-
-// Not the wave-ending opcodes or the epilog return. Tail calls: see isCall.
+// Not the wave-ending opcodes. Tail calls: see isCall.
 static bool isReturnToCaller(const MachineInstr &MI) {
----------------
aobolensk wrote:

thanks, it can be 

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


More information about the llvm-commits mailing list