Skip to content

Commit 8fc25f7

Browse files
author
mattarde
committed
[X86][GlobalIsel] add strictfp attribute from ir in mir
1 parent 4bcc414 commit 8fc25f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/CodeGen/MachineInstr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,10 @@ uint32_t MachineInstr::copyFlagsFromInstruction(const Instruction &I) {
630630
if (I.getMetadata(LLVMContext::MD_unpredictable))
631631
MIFlags |= MachineInstr::MIFlag::Unpredictable;
632632

633+
if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
634+
MIFlags |=
635+
CI->hasFnAttr(llvm::Attribute::StrictFP) ? MachineInstr::NoFPExcept : 0;
636+
}
633637
return MIFlags;
634638
}
635639

0 commit comments

Comments
 (0)