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

[SelectionDAG] Let ComputeKnownSignBits handle (shl (ext X), C) #97695

Merged
merged 2 commits into from
Jul 5, 2024

Commits on Jul 5, 2024

  1. [CodeGen] Pre-commit test case related to ComputeNumSignBits for SHL (l…

    …lvm#97695)
    
    Adding test cases aiming at showing possibility to look through
    ZERO_EXTEND/ANY_EXTEND when computing number of sign bits for an
    SHL node. If all extended bits are shifted out we can analyze the
    operand that is extended.
    bjope committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    f6ae0d3 View commit details
    Browse the repository at this point in the history
  2. [SelectionDAG] Let ComputeKnownSignBits handle (shl (ext X), C) (llvm…

    …#97695)
    
    Add simple support for looking through ZEXT/ANYEXT/SEXT when doing
    ComputeKnownSignBits for SHL. This is valid for the case when all
    extended bits are shifted out, because then the number of sign bits
    can be found by analysing the EXT operand.
    
    A future improvement could be to pass along the "shifted left by"
    information in the recursive calls to ComputeKnownSignBits. Allowing
    us to handle this more generically.
    bjope committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    c2fbc70 View commit details
    Browse the repository at this point in the history