[llvm] [ValueTracking] Compute known FPClass from dominating condition (PR #80740)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 20:56:44 PST 2024
================
@@ -4213,9 +4213,56 @@ llvm::fcmpImpliesClass(CmpInst::Predicate Pred, const Function &F, Value *LHS,
return fcmpImpliesClass(Pred, F, LHS, *ConstRHS, LookThroughSrc);
}
-static FPClassTest computeKnownFPClassFromAssumes(const Value *V,
- const SimplifyQuery &Q) {
- FPClassTest KnownFromAssume = fcAllFlags;
+static KnownFPClass computeKnownFPClassFromContext(const Value *V,
+ const SimplifyQuery &Q) {
+ KnownFPClass KnownFromContext;
+
+ if (!Q.CxtI)
+ return KnownFromContext;
+
+ if (Q.DC && Q.DT) {
+ auto computeKnownFPClassFromCmp = [&](CmpInst::Predicate Pred, Value *LHS,
+ Value *RHS) {
----------------
dtcxzyw wrote:
Done.
https://github.com/llvm/llvm-project/pull/80740
More information about the llvm-commits
mailing list