Skip to content

JIT: Fix GenTree::IsPow2 functions#127615

Open
BoyBaykiller wants to merge 3 commits intodotnet:mainfrom
BoyBaykiller:fix-isPow2
Open

JIT: Fix GenTree::IsPow2 functions#127615
BoyBaykiller wants to merge 3 commits intodotnet:mainfrom
BoyBaykiller:fix-isPow2

Conversation

@BoyBaykiller
Copy link
Copy Markdown
Contributor

IsIntegralConstUnsignedPow2 was passing in sign extended value to isPow2. So it wasn't actually unsigned. For example: 1 << 31 would not be recognized as pow2, because the upper 32 bits were 1. The other 2 were correct technically but I also adjusted them conceptually.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Apr 30, 2026
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 30, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@BoyBaykiller
Copy link
Copy Markdown
Contributor Author

@tannergooding

Comment thread src/coreclr/jit/utils.h Outdated
@BoyBaykiller
Copy link
Copy Markdown
Contributor Author

There was an assert failure in arm codegen which I still had to address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants