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

Don't use GT_ARR_ELEM as a location/value #54780

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/coreclr/jit/assertionprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,13 +1197,6 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1,
toType = op2->gtType;
goto SUBRANGE_COMMON;

case GT_ARR_ELEM:

/* Assigning the result of an indirection into a LCL_VAR, see if we can add a subrange assertion */

toType = op2->gtType;
goto SUBRANGE_COMMON;

case GT_LCL_FLD:

/* Assigning the result of an indirection into a LCL_VAR, see if we can add a subrange assertion */
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/jit/gcinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ GCInfo::WriteBarrierForm GCInfo::gcIsWriteBarrierCandidate(GenTree* tgt, GenTree
case GT_LEA:
return gcWriteBarrierFormFromTargetAddress(tgt->AsAddrMode()->Base());

case GT_ARR_ELEM: /* Definitely in the managed heap */
case GT_CLS_VAR:
return WBF_BarrierUnchecked;

Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/jit/gentree.h
Original file line number Diff line number Diff line change
Expand Up @@ -5366,9 +5366,9 @@ struct GenTreeBoundsChk : public GenTree
}
};

// gtArrElem -- general array element (GT_ARR_ELEM), for non "SZ_ARRAYS"
// -- multidimensional arrays, or 1-d arrays with non-zero lower bounds.

// GenTreeArrElem - bounds checked address (byref) of a general array element,
// for multidimensional arrays, or 1-d arrays with non-zero lower bounds.
//
struct GenTreeArrElem : public GenTree
{
GenTree* gtArrObj;
Expand All @@ -5384,7 +5384,7 @@ struct GenTreeArrElem : public GenTree
// This has caused VSW 571394.
var_types gtArrElemType; // The array element type

// Requires that "inds" is a pointer to an array of "rank" GenTreePtrs for the indices.
// Requires that "inds" is a pointer to an array of "rank" nodes for the indices.
GenTreeArrElem(
var_types type, GenTree* arr, unsigned char rank, unsigned char elemSize, var_types elemType, GenTree** inds)
: GenTree(GT_ARR_ELEM, type), gtArrObj(arr), gtArrRank(rank), gtArrElemSize(elemSize), gtArrElemType(elemType)
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ GenTree* Compiler::fgMorphCast(GenTree* tree)
case GT_IND:
case GT_CLS_VAR:
case GT_LCL_FLD:
case GT_ARR_ELEM:
oper->gtType = dstType;
// We're changing the type here so we need to update the VN;
// in other cases we discard the cast without modifying oper
Expand Down