JIT: Remove VNFOA_Commutative from value numbering attribute table#126895
Closed
JIT: Remove VNFOA_Commutative from value numbering attribute table#126895
Conversation
…ative list functions explicitly Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/c8b3fe1c-795e-4621-9863-dcb83f9ab22c Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
EgorBo
April 14, 2026 18:32
View session
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
This was referenced Apr 15, 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.
Delete
VNFOA_Commutativefrom theVNFOpAttribenum and from thevaluenumfuncs.htable. Instead,VNFuncIsCommutativenow lists commutative functions explicitly.Changes
valuenumfuncs.hcommute(3rd) parameter from allValueNumFuncDefmacro invocations, changing from 4-arg to 3-arg:ValueNumFuncDef(name, arity, knownNonNull)((flag) & HW_Flag_Commutative) >> 0from theHARDWARE_INTRINSICmacro expansionsvaluenum.hVNFOA_Commutativefrom theVNFOpAttribenum and its associated shift constant andstatic_assertcommuteparameter fromGetOpAttribsForGenTreeandGetOpAttribsForFuncdeclarationsVNFuncIsCommutativefrom inline in the header to an out-of-line implementation in the.cpp(needed becauseHWIntrinsicInfois not available in the header)valuenum.cppVNFuncIsCommutativeimplementation that:VNF_Boundary): delegates toGenTree::OperIsCommutative— covers GT_ADD, GT_MUL, GT_OR, GT_XOR, GT_AND, etc.VNF_ADD_OVF,VNF_MUL_OVF,VNF_ADD_UN_OVF,VNF_MUL_UN_OVFVNF_MinInt,VNF_MaxInt,VNF_MinInt_UN,VNF_MaxInt_UNHWIntrinsicInfo::IsCommutativeGetOpAttribsForGenTreeandGetOpAttribsForFuncto remove commute parameterValueNumFuncDefmacro expansions in initialization/validation codeValidateValueNumStoreStaticsMissed commutativity check
VNF_OR/VNF_AND/VNF_XORdon't exist as VNF-range functions — these are genTreeOps (GT_OR,GT_AND,GT_XOR) handled byGenTree::OperIsCommutative. No previously-commutative functions are lost.