[PATCH] D109141: [AggressiveInstCombine] Add `AssumptionCache` to aggressive instcombine

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 5 06:45:33 PDT 2021


anton-afanasyev marked an inline comment as done.
anton-afanasyev added inline comments.


================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp:290
     if (I->isShift()) {
-      KnownBits KnownRHS = computeKnownBits(I->getOperand(1), DL);
+      KnownBits KnownRHS = computeKnownBits(I->getOperand(1));
       unsigned MinBitWidth = KnownRHS.getMaxValue()
----------------
spatel wrote:
> IIUC, there's a subtle difference apart from adding the assumption cache in these calls - we are also now passing in the context instruction and domtree.
> 
> I'm not sure if it is possible to expose that in a regression test, but should we make that a preliminary patch? So add the wrapper calls while passing a null AC as step 1?
Ok, did it this way: https://reviews.llvm.org/D109288


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109141/new/

https://reviews.llvm.org/D109141



More information about the llvm-commits mailing list