[llvm] [AMDGPU] Restore the default rounding mode before calls and returns (PR #222247)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 01:45:21 PDT 2026
================
@@ -432,6 +500,20 @@ void SIModeRegister::processBlockPhase3(MachineBasicBlock &MBB,
else
insertSetreg(MBB, &MBB.instr_front(), TII, Delta);
}
+
+ // Restore the default at the sites recorded in Phase 1.
+ if (!enforceCallBoundary())
+ return;
+ for (auto &[MI, ChangeAtSite] : BlockInfo[ThisBlock]->BoundarySites) {
+ Status AtSite = BlockInfo[ThisBlock]->Pred.merge(ChangeAtSite);
+ if (AtSite.isCompatible(DefaultStatus))
----------------
aobolensk wrote:
Yes, it has to be. This pass only sees one function at a time, so it cannot check what mode the call site or callee actually needs
https://github.com/llvm/llvm-project/pull/222247
More information about the llvm-commits
mailing list