aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2025-02-25 22:03:17 +0800
committerGitHub <noreply@github.com>2025-02-25 22:03:17 +0800
commit44d1dbd24c20a0ee93063dcf44d68e2b8f0bf77c (patch)
tree1057e960ffce2a0d813ee3ae519ff7235560926f /llvm/lib/Support
parentd21b2e619a5e23fd2f4cb05f5929990ee517d164 (diff)
downloadllvm-44d1dbd24c20a0ee93063dcf44d68e2b8f0bf77c.zip
llvm-44d1dbd24c20a0ee93063dcf44d68e2b8f0bf77c.tar.gz
llvm-44d1dbd24c20a0ee93063dcf44d68e2b8f0bf77c.tar.bz2
[X86][DAGCombiner] Skip x87 fp80 values in `combineFMulOrFDivWithIntPow2` (#128618)
f80 is not a valid IEEE floating-point type. Closes https://github.com/llvm/llvm-project/issues/128528.
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APFloat.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index b0d92ae..cbee7f4 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -353,6 +353,11 @@ bool APFloatBase::semanticsHasNaN(const fltSemantics &semantics) {
return semantics.nonFiniteBehavior != fltNonfiniteBehavior::FiniteOnly;
}
+bool APFloatBase::isIEEELikeFP(const fltSemantics &semantics) {
+ // Keep in sync with Type::isIEEELikeFPTy
+ return SemanticsToEnum(semantics) <= S_IEEEquad;
+}
+
bool APFloatBase::isRepresentableAsNormalIn(const fltSemantics &Src,
const fltSemantics &Dst) {
// Exponent range must be larger.