[llvm] 49c39ef - [llvm] FloatingPointPredicateUtils declare template specializations (#141368)

via llvm-commits llvm-commits at lists.llvm.org
Sun May 25 03:22:17 PDT 2025


Author: Tim Gymnich
Date: 2025-05-25T12:22:14+02:00
New Revision: 49c39ef5891c8ca2ec0a5d0e5eaba21048318a78

URL: https://github.com/llvm/llvm-project/commit/49c39ef5891c8ca2ec0a5d0e5eaba21048318a78
DIFF: https://github.com/llvm/llvm-project/commit/49c39ef5891c8ca2ec0a5d0e5eaba21048318a78.diff

LOG: [llvm] FloatingPointPredicateUtils declare template specializations (#141368)

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
    llvm/include/llvm/CodeGen/GlobalISel/MachineFloatingPointPredicateUtils.h

Removed: 
    


################################################################################
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.
 ///


        


More information about the llvm-commits mailing list