[llvm-branch-commits] [llvm] ValueTracking: Special case fmul by llvm.amdgcn.trig.preop (PR #183373)

Jay Foad via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 26 03:52:26 PST 2026


================
@@ -4965,6 +4965,12 @@ static constexpr KnownFPClass::MinMaxKind getMinMaxKind(Intrinsic::ID IID) {
   }
 }
 
+/// \return true if this is a floating point value that is known to have a
+/// magintude smaller than 1. i.e., fabs(X) <=1.0
+static bool isAbsoluteValueLessEqualOne(const Value *V) {
+  return match(V, m_Intrinsic<Intrinsic::amdgcn_trig_preop>(m_Value()));
----------------
jayfoad wrote:

`frexp` is another case that might be more generally useful.

https://github.com/llvm/llvm-project/pull/183373


More information about the llvm-branch-commits mailing list