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

Fix bad folding #54722

Merged
merged 2 commits into from
Jul 13, 2021
Merged

Fix bad folding #54722

merged 2 commits into from
Jul 13, 2021

Commits on Jun 25, 2021

  1. Always sign-extend from int32 in gtFoldExprConst

    GT_CNS_INT of TYP_INT on 64 hosts has an implicit contract:
    the value returned by IconValue() must "fit" into 32 bit
    signed integer, i. e. "static_cast<int>(IconValue()) == IconValue()".
    gtFoldExprConst was failing to uphold this contract when the target
    was 32 bit and the host was 64 bit.
    
    Fix this by always truncating before calling SetIconValue().
    SingleAccretion committed Jun 25, 2021
    Configuration menu
    Copy the full SHA
    7e030a8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    576315f View commit details
    Browse the repository at this point in the history