Skip to content
Commit 39fc5a6f authored by Yaron Keren's avatar Yaron Keren
Browse files

Fix rare case where APInt divide algorithm applied un-needed transformation.

APInt uses Knuth's D algorithm for long division. In rare cases the
implementation applied a transformation that was not needed.

Added unit tests for long division. KnuthDiv() procedure is fully covered.
There is a case in APInt::divide() that I believe is never used (marked with
a comment) as all users of divide() handle trivial cases earlier.

Patch by Pawel Bylica!

  http://reviews.llvm.org/D8448

llvm-svn: 233312
parent efa49c26
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment