Skip to content

Conversation

@tgymnich
Copy link
Member

@tgymnich tgymnich commented May 24, 2025

  • declare template specializations
  • should fix issues with LTO

@tgymnich tgymnich requested a review from cachemeifyoucan May 24, 2025 20:17
@tgymnich tgymnich marked this pull request as ready for review May 24, 2025 20:43
@llvmbot llvmbot added llvm:globalisel llvm:analysis Includes value tracking, cost tables and constant folding labels May 24, 2025
@llvmbot
Copy link
Member

llvmbot commented May 24, 2025

@llvm/pr-subscribers-llvm-globalisel

@llvm/pr-subscribers-llvm-analysis

Author: Tim Gymnich (tgymnich)

Changes
  • declare template specializations
  • should fix issues with LTO

Full diff: https://github.com/llvm/llvm-project/pull/141368.diff

2 Files Affected:

  • (modified) llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h (+12)
  • (modified) llvm/include/llvm/CodeGen/GlobalISel/MachineFloatingPointPredicateUtils.h (+13)
diff --git a/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h b/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
index c1824950b55c4..ea48de5974170 100644
--- a/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
+++ b/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
@@ -17,6 +17,18 @@ namespace llvm {
 using FloatingPointPredicateUtils =
     GenericFloatingPointPredicateUtils<SSAContext>;
 
+template <>
+DenormalMode FloatingPointPredicateUtils::queryDenormalMode(const Function &F,
+                                                            Value *Val);
+
+template <>
+bool FloatingPointPredicateUtils::lookThroughFAbs(const Function &F, Value *LHS,
+                                                  Value *&Src);
+
+template <>
+std::optional<APFloat>
+FloatingPointPredicateUtils::matchConstantFloat(const Function &F, Value *Val);
+
 /// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
 /// same result as an fcmp with the given operands.
 ///
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/MachineFloatingPointPredicateUtils.h b/llvm/include/llvm/CodeGen/GlobalISel/MachineFloatingPointPredicateUtils.h
index d3a31165bb63e..26910978fa8c8 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/MachineFloatingPointPredicateUtils.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/MachineFloatingPointPredicateUtils.h
@@ -17,6 +17,19 @@ namespace llvm {
 using MachineFloatingPointPredicateUtils =
     GenericFloatingPointPredicateUtils<MachineSSAContext>;
 
+template <>
+DenormalMode
+MachineFloatingPointPredicateUtils::queryDenormalMode(const MachineFunction &MF,
+                                                      Register Val);
+
+template <>
+bool MachineFloatingPointPredicateUtils::lookThroughFAbs(
+    const MachineFunction &MF, Register LHS, Register &Src);
+
+template <>
+std::optional<APFloat> MachineFloatingPointPredicateUtils::matchConstantFloat(
+    const MachineFunction &MF, Register Val);
+
 /// Compute the possible floating-point classes that \p LHS could be based on
 /// fcmp \Pred \p LHS, \p RHS.
 ///

@tgymnich tgymnich merged commit 49c39ef into llvm:main May 25, 2025
16 checks passed
@tgymnich tgymnich deleted the tim/declare-predicate-utils-temp-spec branch June 17, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:analysis Includes value tracking, cost tables and constant folding llvm:globalisel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants