[llvm] [ConstraintFP] Model rounding control registers for inline asm (PR #92846)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 23:00:41 PDT 2024
================
@@ -669,8 +669,14 @@ const MCPhysReg *X86TargetLowering::getScratchRegisters(CallingConv::ID) const {
return ScratchRegs;
}
-ArrayRef<MCPhysReg> X86TargetLowering::getRoundingControlRegisters() const {
+ArrayRef<MCPhysReg>
+X86TargetLowering::getRoundingControlRegisters(const char *AsmStr) const {
static const MCPhysReg RCRegs[] = {X86::FPCW, X86::MXCSR};
+ if (AsmStr) {
----------------
phoebewang wrote:
But I'd argue that strictfp has two independent controls: "rounding mode" and "exceptions". It's a reasonable usage to only care about "rounding mode" and ignore "exceptions". For this case, scheduling non-RC-def inline asm among other FP instructions is permitted.
https://github.com/llvm/llvm-project/pull/92846
More information about the llvm-commits
mailing list