[llvm] [InstSimplify] Fold expression using basic properties of floor and ceiling function (PR #107107)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 21:24:32 PDT 2024
================
@@ -4130,19 +4130,47 @@ static Value *simplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
//
// This catches the 2 variable input case, constants are handled below as a
// class-like compare.
+ KnownFPClass LHSClass = computeKnownFPClass(LHS, fcAllFlags, /*Depth=*/0, Q);
+ KnownFPClass RHSClass = computeKnownFPClass(RHS, fcAllFlags, /*Depth=*/0, Q);
----------------
arsenm wrote:
These queries can be expensive and you should try to defer them as late as possible (and prefer to early exit on the RHS query before the LHS, as the RHS is canonically cheaper)
https://github.com/llvm/llvm-project/pull/107107
More information about the llvm-commits
mailing list