[PATCH] D141129: [InstCombine] Use KnownBits for lshr/add -> (a + b < a)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 08:06:50 PST 2023


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:846
 //    where
-//      - The add's operands are zexts from a K-bits integer to a bigger type.
+//      - Only the K leading bits of X and Y can be non-zero.
 //      - The add is only used by the shr, or by iK (or narrower) truncates.
----------------
Should that be "Only the K trailing bits..." or "The 'width - K' leading bits must be zero."?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141129



More information about the llvm-commits mailing list