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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 2 10:34:16 PDT 2021


spatel 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()
----------------
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?


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