[llvm] [X86][GlobalIsel] add strictfp attribute from ir into mir (PR #136702)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 07:26:22 PDT 2025


================
@@ -630,6 +630,10 @@ uint32_t MachineInstr::copyFlagsFromInstruction(const Instruction &I) {
   if (I.getMetadata(LLVMContext::MD_unpredictable))
     MIFlags |= MachineInstr::MIFlag::Unpredictable;
 
+  if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
+    MIFlags |=
+        CI->hasFnAttr(llvm::Attribute::StrictFP) ? MachineInstr::NoFPExcept : 0;
----------------
phoebewang wrote:

`NoFPExcept` is to clear the flag, not to set it.

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


More information about the llvm-commits mailing list