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

[MLIR] Update APInt construction to correctly set isSigned/implicitTrunc #110466

Merged
merged 2 commits into from
Oct 14, 2024

Commits on Sep 30, 2024

  1. [MLIR] Make compatible with APInt ctor assertion

    This fixes all the places in MLIR that hit the new assertion added
    in llvm#106524, in preparation for enabling it by default. That is,
    cases where the value passed to the APInt constructor is not an N-bit
    signed/unsigned integer, where N is the bit width and signedness is
    determined by the isSigned flag.
    
    The fixes either set the correct value for isSigned, or set the
    implicitTrunc flag to retain the old behavior. I've left TODOs
    for the latter case in some places, where I think that it may be
    worthwhile to stop doing implicit truncation in the future.
    
    Note that the assertion is currently still disabled by default, so
    this patch is mostly NFC.
    nikic committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    5e705e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    621de6a View commit details
    Browse the repository at this point in the history