[llvm] [ValueTracking][NFC] Pass `SimplifyQuery` to `computeKnownFPClass` family (PR #80657)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 10:03:00 PST 2024


================
@@ -343,13 +343,9 @@ bool GCNTTIImpl::canSimplifyLegacyMulToMul(const Instruction &I,
     return true;
   }
 
-  auto *TLI = &IC.getTargetLibraryInfo();
-  if (isKnownNeverInfOrNaN(Op0, IC.getDataLayout(), TLI, 0,
-                           &IC.getAssumptionCache(), &I,
-                           &IC.getDominatorTree()) &&
-      isKnownNeverInfOrNaN(Op1, IC.getDataLayout(), TLI, 0,
-                           &IC.getAssumptionCache(), &I,
-                           &IC.getDominatorTree())) {
+  SimplifyQuery SQ = IC.getSimplifyQuery().getWithInstruction(&I);
+  if (isKnownNeverInfOrNaN(Op0, /*Depth=*/0, SQ) &&
----------------
dtcxzyw wrote:

> KnownBits computeKnownBits(const Value *V, unsigned Depth, const SimplifyQuery &Q);

The depth argument in `computeKnownBits` is also not the last one.


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


More information about the llvm-commits mailing list