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

[ConstantRange] Fix off by 1 bugs in UIToFP and SIToFP handling. #86041

Merged
merged 1 commit into from
Mar 21, 2024

Commits on Mar 21, 2024

  1. [ConstantRange] Fix off by 1 bugs in UIToFP and SIToFP handling.

    We were passing the min and max values of the range to the ConstantRange
    constructor, but the constructor expects the upper bound to 1
    more than the max value so we need to add 1.
    
    We also need to use getNonEmpty so that passing 0, 0 to the constructor
    creates a full range rather than an empty range. And passing smin, smax+1
    doesn't cause an assertion.
    
    I believe this fixes at least some of the reason llvm#79158 was reverted.
    topperc committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    83bb4a3 View commit details
    Browse the repository at this point in the history