[llvm] [X86] Treat returns as SpecialFP values (PR #83615)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 12:11:01 PST 2024
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/83615
SpecialFP value handling function has logic for handling returns, but for returns it never gets called because the codepath for it was mistakenly omitted.
>From 7a1e013c1b3e46d0d8c6cc4888ba294714f21a4c Mon Sep 17 00:00:00 2001
From: Rose <83477269+AtariDreams at users.noreply.github.com>
Date: Fri, 1 Mar 2024 14:31:26 -0500
Subject: [PATCH] [X86] Treat returns as SpecialFP values
SpecialFP value handling function has logic for handling returns, but for returns it never gets called because the codepath for it was mistakenly omitted.
---
llvm/lib/Target/X86/X86FloatingPoint.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/llvm/lib/Target/X86/X86FloatingPoint.cpp b/llvm/lib/Target/X86/X86FloatingPoint.cpp
index ca4d03913d093e..5064e75fb44348 100644
--- a/llvm/lib/Target/X86/X86FloatingPoint.cpp
+++ b/llvm/lib/Target/X86/X86FloatingPoint.cpp
@@ -432,6 +432,9 @@ bool FPS::processBasicBlock(MachineFunction &MF, MachineBasicBlock &BB) {
if (MI.isCall())
FPInstClass = X86II::SpecialFP;
+ if (MI.isReturn())
+ FPInstClass = X86II::SpecialFP;
+
if (FPInstClass == X86II::NotFP)
continue; // Efficiently ignore non-fp insts!
More information about the llvm-commits
mailing list