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

Improve value numbering for casts #59841

Merged
merged 4 commits into from
Oct 15, 2021

Commits on Oct 1, 2021

  1. Refactor how casts are VNed, part 1

    Remove duplication between VNPairForCast
    and VNForCast, route the former through
    the latter.
    
    Also change the debug output for casts.
    
    No diffs for this commit.
    SingleAccretion committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    35bac19 View commit details
    Browse the repository at this point in the history
  2. Refactor how casts are VNed, part 2

    VN cast helpers just like casts.
    This allows them to be folded.
    
    In the past, this was dangerous because some of
    the pessimization protected us from undefined
    behavior in cases of out-of-bounds conversions,
    but now we do not fold such cases anymore.
    SingleAccretion committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    6b5d558 View commit details
    Browse the repository at this point in the history
  3. Enable VN-based constant propagation for calls

    This solves some of the regressions seen due to
    now-missing CSEs of these helper calls evaluated
    as constants by VN.
    SingleAccretion committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    548a6ce View commit details
    Browse the repository at this point in the history
  4. Fix VNFuncs for MUL_OVF helpers

    This fixes the test failures revealed by
    the more aggressive constant propagation.
    
    This is very similar to a bug that was recently
    fixed where checked casts were treated as non-checked
    and could be observed without the assertion propagation
    changes as well, with the redundant branches optimization.
    SingleAccretion committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    3bcf1a9 View commit details
    Browse the repository at this point in the history