[PATCH] D72423: [DemandedBits] Improve accuracy of Add propagator

Erika via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 04:38:42 PDT 2020


rrika updated this revision to Diff 285623.
rrika marked 4 inline comments as done.
rrika added a comment.

Sorry for the delay. Changes:

- ForeachKnownBits / ForeachNumInKnownBits in their own header
- Added a fast path for the case that AOut is shaped like 00001111 (`if (AOut.isMask()) { AB = AOut; }`), importantly known bits of the arguments are not computed in this case
- Added an assertion for the carry

In D72423#1959341 <https://reviews.llvm.org/D72423#1959341>, @RKSimon wrote:

> [...] If possible I'd like to see some tests in InstCombine/InstSimplify that demonstrates the benefit of this. [...]

What would that look like exactly? I guess you mean something other than the new `test/Analysis/DemandedBits/add.ll`.


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

https://reviews.llvm.org/D72423

Files:
  llvm/include/llvm/Analysis/DemandedBits.h
  llvm/lib/Analysis/DemandedBits.cpp
  llvm/test/Analysis/DemandedBits/add.ll
  llvm/unittests/IR/CMakeLists.txt
  llvm/unittests/IR/DemandedBitsTest.cpp
  llvm/unittests/Support/KnownBitsTest.cpp
  llvm/unittests/Support/KnownBitsTest.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72423.285623.patch
Type: text/x-patch
Size: 12230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200814/dfb0549f/attachment.bin>


More information about the llvm-commits mailing list