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

[LoopIdiom] Reland: Support 'shift until less-than' idiom #95002 #98298

Merged
merged 2 commits into from
Jul 16, 2024

Commits on Jul 10, 2024

  1. [LoopIdiom] Support 'shift until less-than' idiom

    The current loop idiom code for recognising and inserting a CTLZ
    intrinsic does not support loops where the loopback control is based on
    an unsigned less-than condition. This patch adds support for recognising
    these loops and inserting a CTLZ intrinsic.
    
    Fixes the missed optimization cases in llvm#51064
    
    Co-authored-by: David Sherwood <[email protected]>
    hazzlim and david-arm committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    1a4e312 View commit details
    Browse the repository at this point in the history
  2. Use APInt for threshold in matchShiftULTCondition

    Use APInt for the threshold in matchShiftULTCondition, so that the
    function works for integers of arbitrary precision (rather than just
    those within the range of uint64_t).
    hazzlim committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    6231876 View commit details
    Browse the repository at this point in the history