[PATCH] D108992: [KnownBits] Add support for X+X and X*X self-addition/multiplication

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 08:24:38 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Support/KnownBits.cpp:61
   if (Add) {
+    if (SelfAdd) {
+      // Sum = LHS + LHS = LHS << 1
----------------
foad wrote:
> I'm not a huge fan of making this part of the existing computeForAddSub function, since it's a completely separate code path. How about a new computeForSelfAdd instead?
I'm going to drop the X+X case for now - and handle it as part of PR50468


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108992



More information about the llvm-commits mailing list