[PATCH] D34029: Infer lowest bits of an integer Multiply when the low bits of the operands are known

Pedro Ferreira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 00:59:11 PDT 2017


PFerreira updated this revision to Diff 107027.
PFerreira added a comment.

Added the test you asked me about, slightly modified. I wanted to make sure that the ComputeKnownBits picked the correct bitwidth. The sample test you mentioned had the two inputs with the same bit width, so I just added two more. I can put it back to "3" if you prefer.

I tried to figure out how this could be improved, and considered your idea of leading zeros. I think I understood what you were thinking, but while trying to figure out the math I couldn't see how it would be possible. Having an extra leading known-zero on one of the operands over another operand would not help to figure out more digits, as far as I could see.


https://reviews.llvm.org/D34029

Files:
  lib/Analysis/ValueTracking.cpp
  unittests/Analysis/ValueTrackingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34029.107027.patch
Type: text/x-patch
Size: 3974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170718/34adf9d1/attachment.bin>


More information about the llvm-commits mailing list