Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KnownBits: refine high-bits of mul in signed case #113051

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Oct 19, 2024

  1. Configuration menu
    Copy the full SHA
    786df0c View commit details
    Browse the repository at this point in the history
  2. KnownBits: refine high-bits of mul in signed case

    KnownBits::mul suffers from the deficiency that it doesn't account for
    signed inputs. Fix it by refining known leading zeros when both inputs
    are signed, and setting known leading ones when one of the inputs is
    signed. The strategy we've used is to still use umul_ov, after adjusting
    for signed inputs, and setting known leading ones from the negation of
    the result, when it is known to be negative, noting that a possibly-zero
    result is a special case.
    artagnon committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    a9edba0 View commit details
    Browse the repository at this point in the history