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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 09:55:01 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) &&
----------------
arsenm wrote:

At some point we should also fix the depth argument not being the last argument 

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


More information about the llvm-commits mailing list