Handle GT_CCMP in GenTree::OperConsumesFlags on TARGET_AMD64#127477
Merged
tannergooding merged 3 commits intomainfrom Apr 28, 2026
Merged
Handle GT_CCMP in GenTree::OperConsumesFlags on TARGET_AMD64#127477tannergooding merged 3 commits intomainfrom
tannergooding merged 3 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/e9e0abb3-4b18-4e4d-b266-870cc5ed0607 Co-authored-by: tannergooding <10487869+tannergooding@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add handling for GT_CCMP in GenTree::OperConsumesFlags on TARGET_AMD64
Handle GT_CCMP in GenTree::OperConsumesFlags on TARGET_AMD64
Apr 27, 2026
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/da52f1ef-5b60-4589-9a36-e3beb1fb4b03 Co-authored-by: tannergooding <10487869+tannergooding@users.noreply.github.com>
tannergooding
approved these changes
Apr 27, 2026
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
This was referenced Apr 28, 2026
am11
reviewed
Apr 28, 2026
jakobbotsch
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GenTree::OperConsumesFlagshandledGT_CCMPonly onTARGET_ARM64, even thoughGT_CCMPis also emitted onTARGET_AMD64(gated by#if defined(TARGET_ARM64) || defined(TARGET_AMD64)ingtlist.h).Changes
src/coreclr/jit/gentree.h— Add aTARGET_AMD64branch inOperConsumesFlags.GT_JCC,GT_SETCC,GT_SELECTCC, andGT_CCMPare declared sequentially ingtlist.h(intervening lines are only comments /#ifguards), so their enum values are contiguous and a range check collapses 4 comparisons to 2 — matching the existing idiom used elsewhere in the file (e.g.OperIsCompare). Astatic_assert(AreContiguous(...))guards the assumption, consistent with surrounding helpers.Callers (
lir.cpp,liveness.cpp,lower.cpp,sideeffects.cpp) will now correctly recognize AMD64GT_CCMPas flag-consuming when ordering / scheduling around flag-producing nodes.Note
This pull request was created by GitHub Copilot.