[llvm] [GlobalISel][ARM] Legalize reset_fpmode (PR #115859)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 23:49:19 PST 2024
================
@@ -467,6 +468,18 @@ bool ARMLegalizerInfo::legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI,
MIRBuilder.buildSetFPEnv(NewFPSCR);
break;
}
+ case G_RESET_FPMODE: {
+ // To get the default FP mode all control bits are cleared:
+ // FPSCR = FPSCR & (FPStatusBits | FPReservedBits)
+ LLT FPEnvTy = LLT::scalar(32);
+ auto FPEnv = MRI.createGenericVirtualRegister(FPEnvTy);
+ MIRBuilder.buildGetFPEnv(FPEnv);
----------------
spavloff wrote:
Yes, changed accordingly.
https://github.com/llvm/llvm-project/pull/115859
More information about the llvm-commits
mailing list