Skip to content

Conversation

@mahesh-attarde
Copy link
Contributor

I am supporting G_IS_FPCLASS opcode and noticed strictfp attribute was not forwarded into MIFlag.
This patch adds attribute to MIR in GISEL-IRTranslator.
Requirement comes from G_IS_FPCLASS PR mahesh-attarde#4 for strictfp.

@mahesh-attarde mahesh-attarde changed the title [X86][GlobalIsel] add strictfp attribute from ir in mir [X86][GlobalIsel] add strictfp attribute from ir into mir Apr 22, 2025

if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
MIFlags |=
CI->hasFnAttr(llvm::Attribute::StrictFP) ? MachineInstr::NoFPExcept : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me recheck my use case again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants