summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Andreenko <seandree@microsoft.com>2017-01-06 17:19:42 -0800
committerSergey Andreenko <seandree@microsoft.com>2017-01-07 16:32:10 -0800
commit3ac388f2c1ca7ec4e2a1d8235722d07f21bbbea9 (patch)
tree78c90d3db378b7e195ccfbc65b5d21a09167059d
parent7f8557fb17c58a093bf54bd17e965b9181bba772 (diff)
downloadcoreclr-3ac388f2c1ca7ec4e2a1d8235722d07f21bbbea9.tar.gz
coreclr-3ac388f2c1ca7ec4e2a1d8235722d07f21bbbea9.tar.bz2
coreclr-3ac388f2c1ca7ec4e2a1d8235722d07f21bbbea9.zip
Change fields order in GenTreeBoundsChk.
-rw-r--r--src/jit/codegenarm.cpp8
-rw-r--r--src/jit/codegenarm64.cpp2
-rw-r--r--src/jit/codegenlegacy.cpp25
-rw-r--r--src/jit/codegenxarch.cpp4
-rw-r--r--src/jit/compiler.cpp2
-rw-r--r--src/jit/flowgraph.cpp2
-rw-r--r--src/jit/gentree.cpp64
-rw-r--r--src/jit/gentree.h6
-rw-r--r--src/jit/morph.cpp6
-rw-r--r--src/jit/optimizer.cpp4
-rw-r--r--src/jit/simd.cpp8
-rw-r--r--src/jit/valuenum.cpp6
-rw-r--r--tests/testsUnsupportedOnARM32.txt1
-rw-r--r--tests/x86_jit32_issues.targets3
-rw-r--r--tests/x86_legacy_backend_issues.targets3
15 files changed, 70 insertions, 74 deletions
diff --git a/src/jit/codegenarm.cpp b/src/jit/codegenarm.cpp
index a7bd93115d..8a894cda0b 100644
--- a/src/jit/codegenarm.cpp
+++ b/src/jit/codegenarm.cpp
@@ -885,11 +885,14 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
noway_assert(oper->OperGet() == GT_ARR_BOUNDS_CHECK);
GenTreeBoundsChk* bndsChk = oper->AsBoundsChk();
- GenTreePtr arrLen = bndsChk->gtArrLen->gtEffectiveVal();
GenTreePtr arrIdx = bndsChk->gtIndex->gtEffectiveVal();
+ GenTreePtr arrLen = bndsChk->gtArrLen->gtEffectiveVal();
GenTreePtr arrRef = NULL;
int lenOffset = 0;
+ genConsumeIfReg(arrIdx);
+ genConsumeIfReg(arrLen);
+
GenTree * src1, *src2;
emitJumpKind jmpKind;
@@ -908,9 +911,6 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
jmpKind = genJumpKindForOper(GT_GE, CK_UNSIGNED);
}
- genConsumeIfReg(src1);
- genConsumeIfReg(src2);
-
getEmitter()->emitInsBinary(INS_cmp, emitAttr(TYP_INT), src1, src2);
genJumpToThrowHlpBlk(jmpKind, SCK_RNGCHK_FAIL, bndsChk->gtIndRngFailBB);
}
diff --git a/src/jit/codegenarm64.cpp b/src/jit/codegenarm64.cpp
index cc7c5dc524..c96ee97f28 100644
--- a/src/jit/codegenarm64.cpp
+++ b/src/jit/codegenarm64.cpp
@@ -3798,8 +3798,8 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
GenTree * src1, *src2;
emitJumpKind jmpKind;
- genConsumeRegs(arrLen);
genConsumeRegs(arrIndex);
+ genConsumeRegs(arrLen);
if (arrIndex->isContainedIntOrIImmed())
{
diff --git a/src/jit/codegenlegacy.cpp b/src/jit/codegenlegacy.cpp
index 667b9d4af8..fe8d91f4ed 100644
--- a/src/jit/codegenlegacy.cpp
+++ b/src/jit/codegenlegacy.cpp
@@ -1837,6 +1837,15 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
GenTreePtr arrRef = NULL;
int lenOffset = 0;
+ /* Is the array index a constant value? */
+ GenTreePtr index = bndsChk->gtIndex;
+ if (!index->IsCnsIntOrI())
+ {
+ // No, it's not a constant.
+ genCodeForTree(index, RBM_ALLINT);
+ regSet.rsMarkRegUsed(index);
+ }
+
// If "arrLen" is a ARR_LENGTH operation, get the array whose length that takes in a register.
// Otherwise, if the length is not a constant, get it (the length, not the arr reference) in
// a register.
@@ -1884,14 +1893,8 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
}
}
- /* Is the array index a constant value? */
- GenTreePtr index = bndsChk->gtIndex;
if (!index->IsCnsIntOrI())
{
- // No, it's not a constant.
- genCodeForTree(index, RBM_ALLINT);
- regSet.rsMarkRegUsed(index);
-
// If we need "arrRef" or "arrLen", and evaluating "index" displaced whichever of them we're using
// from its register, get it back in a register.
if (arrRef != NULL)
@@ -1983,6 +1986,11 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
}
// Free the registers that were used.
+ if (!index->IsCnsIntOrI())
+ {
+ regSet.rsMarkRegFree(index->gtRegNum, index);
+ }
+
if (arrRef != NULL)
{
regSet.rsMarkRegFree(arrRef->gtRegNum, arrRef);
@@ -1991,11 +1999,6 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
{
regSet.rsMarkRegFree(arrLen->gtRegNum, arrLen);
}
-
- if (!index->IsCnsIntOrI())
- {
- regSet.rsMarkRegFree(index->gtRegNum, index);
- }
}
/*****************************************************************************
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 8e0af48799..a22320ef5b 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -3863,16 +3863,16 @@ void CodeGen::genRangeCheck(GenTreePtr oper)
GenTreeBoundsChk* bndsChk = oper->AsBoundsChk();
- GenTreePtr arrLen = bndsChk->gtArrLen;
GenTreePtr arrIndex = bndsChk->gtIndex;
+ GenTreePtr arrLen = bndsChk->gtArrLen;
GenTreePtr arrRef = nullptr;
int lenOffset = 0;
GenTree * src1, *src2;
emitJumpKind jmpKind;
- genConsumeRegs(arrLen);
genConsumeRegs(arrIndex);
+ genConsumeRegs(arrLen);
if (arrIndex->isContainedIntOrIImmed())
{
diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp
index 30eccc3ce7..32d7261bf7 100644
--- a/src/jit/compiler.cpp
+++ b/src/jit/compiler.cpp
@@ -6850,8 +6850,8 @@ void Compiler::CopyTestDataToCloneTree(GenTreePtr from, GenTreePtr to)
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- CopyTestDataToCloneTree(from->gtBoundsChk.gtArrLen, to->gtBoundsChk.gtArrLen);
CopyTestDataToCloneTree(from->gtBoundsChk.gtIndex, to->gtBoundsChk.gtIndex);
+ CopyTestDataToCloneTree(from->gtBoundsChk.gtArrLen, to->gtBoundsChk.gtArrLen);
return;
default:
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index 441569c339..78e75066e8 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -18004,8 +18004,8 @@ void Compiler::fgSetTreeSeqHelper(GenTreePtr tree, bool isLIR)
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
// Evaluate the trees left to right
- fgSetTreeSeqHelper(tree->gtBoundsChk.gtArrLen, isLIR);
fgSetTreeSeqHelper(tree->gtBoundsChk.gtIndex, isLIR);
+ fgSetTreeSeqHelper(tree->gtBoundsChk.gtArrLen, isLIR);
break;
case GT_STORE_DYN_BLK:
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp
index 5caec5f1f0..51f4d64338 100644
--- a/src/jit/gentree.cpp
+++ b/src/jit/gentree.cpp
@@ -847,12 +847,12 @@ Compiler::fgWalkResult Compiler::fgWalkTreePreRec(GenTreePtr* pTree, fgWalkData*
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- result = fgWalkTreePreRec<computeStack>(&tree->gtBoundsChk.gtArrLen, fgWalkData);
+ result = fgWalkTreePreRec<computeStack>(&tree->gtBoundsChk.gtIndex, fgWalkData);
if (result == WALK_ABORT)
{
return result;
}
- result = fgWalkTreePreRec<computeStack>(&tree->gtBoundsChk.gtIndex, fgWalkData);
+ result = fgWalkTreePreRec<computeStack>(&tree->gtBoundsChk.gtArrLen, fgWalkData);
if (result == WALK_ABORT)
{
return result;
@@ -1102,12 +1102,12 @@ Compiler::fgWalkResult Compiler::fgWalkTreePostRec(GenTreePtr* pTree, fgWalkData
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- result = fgWalkTreePostRec<computeStack>(&tree->gtBoundsChk.gtArrLen, fgWalkData);
+ result = fgWalkTreePostRec<computeStack>(&tree->gtBoundsChk.gtIndex, fgWalkData);
if (result == WALK_ABORT)
{
return result;
}
- result = fgWalkTreePostRec<computeStack>(&tree->gtBoundsChk.gtIndex, fgWalkData);
+ result = fgWalkTreePostRec<computeStack>(&tree->gtBoundsChk.gtArrLen, fgWalkData);
if (result == WALK_ABORT)
{
return result;
@@ -1446,12 +1446,12 @@ Compiler::fgWalkResult Compiler::fgWalkTreeRec(GenTreePtr* pTree, fgWalkData* fg
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- result = fgWalkTreeRec<doPreOrder, doPostOrder>(&tree->gtBoundsChk.gtArrLen, fgWalkData);
+ result = fgWalkTreeRec<doPreOrder, doPostOrder>(&tree->gtBoundsChk.gtIndex, fgWalkData);
if (result == WALK_ABORT)
{
return result;
}
- result = fgWalkTreeRec<doPreOrder, doPostOrder>(&tree->gtBoundsChk.gtIndex, fgWalkData);
+ result = fgWalkTreeRec<doPreOrder, doPostOrder>(&tree->gtBoundsChk.gtArrLen, fgWalkData);
if (result == WALK_ABORT)
{
return result;
@@ -2378,8 +2378,8 @@ AGAIN:
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- return Compare(op1->gtBoundsChk.gtArrLen, op2->gtBoundsChk.gtArrLen) &&
- Compare(op1->gtBoundsChk.gtIndex, op2->gtBoundsChk.gtIndex) &&
+ return Compare(op1->gtBoundsChk.gtIndex, op2->gtBoundsChk.gtIndex) &&
+ Compare(op1->gtBoundsChk.gtArrLen, op2->gtBoundsChk.gtArrLen) &&
(op1->gtBoundsChk.gtThrowKind == op2->gtBoundsChk.gtThrowKind);
case GT_STORE_DYN_BLK:
@@ -2604,11 +2604,11 @@ AGAIN:
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- if (gtHasRef(tree->gtBoundsChk.gtArrLen, lclNum, defOnly))
+ if (gtHasRef(tree->gtBoundsChk.gtIndex, lclNum, defOnly))
{
return true;
}
- if (gtHasRef(tree->gtBoundsChk.gtIndex, lclNum, defOnly))
+ if (gtHasRef(tree->gtBoundsChk.gtArrLen, lclNum, defOnly))
{
return true;
}
@@ -3001,8 +3001,8 @@ AGAIN:
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- hash = genTreeHashAdd(hash, gtHashValue(tree->gtBoundsChk.gtArrLen));
hash = genTreeHashAdd(hash, gtHashValue(tree->gtBoundsChk.gtIndex));
+ hash = genTreeHashAdd(hash, gtHashValue(tree->gtBoundsChk.gtArrLen));
hash = genTreeHashAdd(hash, tree->gtBoundsChk.gtThrowKind);
break;
@@ -3265,12 +3265,12 @@ AGAIN:
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
{
- if (!lvaLclVarRefsAccum(tree->gtBoundsChk.gtArrLen, findPtr, refsPtr, &allVars, &trkdVars))
+ if (!lvaLclVarRefsAccum(tree->gtBoundsChk.gtIndex, findPtr, refsPtr, &allVars, &trkdVars))
{
return false;
}
// Otherwise...
- if (!lvaLclVarRefsAccum(tree->gtBoundsChk.gtIndex, findPtr, refsPtr, &allVars, &trkdVars))
+ if (!lvaLclVarRefsAccum(tree->gtBoundsChk.gtArrLen, findPtr, refsPtr, &allVars, &trkdVars))
{
return false;
}
@@ -5622,17 +5622,17 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
costEx = 4; // cmp reg,reg and jae throw (not taken)
costSz = 7; // jump to cold section
- level = gtSetEvalOrder(tree->gtBoundsChk.gtArrLen);
- costEx += tree->gtBoundsChk.gtArrLen->gtCostEx;
- costSz += tree->gtBoundsChk.gtArrLen->gtCostSz;
+ level = gtSetEvalOrder(tree->gtBoundsChk.gtIndex);
+ costEx += tree->gtBoundsChk.gtIndex->gtCostEx;
+ costSz += tree->gtBoundsChk.gtIndex->gtCostSz;
- lvl2 = gtSetEvalOrder(tree->gtBoundsChk.gtIndex);
+ lvl2 = gtSetEvalOrder(tree->gtBoundsChk.gtArrLen);
if (level < lvl2)
{
level = lvl2;
}
- costEx += tree->gtBoundsChk.gtIndex->gtCostEx;
- costSz += tree->gtBoundsChk.gtIndex->gtCostSz;
+ costEx += tree->gtBoundsChk.gtArrLen->gtCostEx;
+ costSz += tree->gtBoundsChk.gtArrLen->gtCostSz;
break;
@@ -5954,8 +5954,8 @@ void Compiler::gtComputeFPlvls(GenTreePtr tree)
break;
case GT_ARR_BOUNDS_CHECK:
- gtComputeFPlvls(tree->gtBoundsChk.gtArrLen);
gtComputeFPlvls(tree->gtBoundsChk.gtIndex);
+ gtComputeFPlvls(tree->gtBoundsChk.gtArrLen);
noway_assert(!isflt);
break;
@@ -6134,14 +6134,14 @@ GenTreePtr* GenTree::gtGetChildPointer(GenTreePtr parent)
#ifdef FEATURE_SIMD
case GT_SIMD_CHK:
#endif // FEATURE_SIMD
- if (this == parent->gtBoundsChk.gtArrLen)
- {
- return &(parent->gtBoundsChk.gtArrLen);
- }
if (this == parent->gtBoundsChk.gtIndex)
{
return &(parent->gtBoundsChk.gtIndex);
}
+ if (this == parent->gtBoundsChk.gtArrLen)
+ {
+ return &(parent->gtBoundsChk.gtArrLen);
+ }
if (this == parent->gtBoundsChk.gtIndRngFailBB)
{
return &(parent->gtBoundsChk.gtIndRngFailBB);
@@ -8341,8 +8341,8 @@ GenTreePtr Compiler::gtCloneExpr(
#endif // FEATURE_SIMD
copy = new (this, oper)
GenTreeBoundsChk(oper, tree->TypeGet(),
- gtCloneExpr(tree->gtBoundsChk.gtArrLen, addFlags, deepVarNum, deepVarVal),
gtCloneExpr(tree->gtBoundsChk.gtIndex, addFlags, deepVarNum, deepVarVal),
+ gtCloneExpr(tree->gtBoundsChk.gtArrLen, addFlags, deepVarNum, deepVarVal),
tree->gtBoundsChk.gtThrowKind);
break;
@@ -9051,9 +9051,9 @@ GenTreePtr GenTree::GetChild(unsigned childNum)
switch (childNum)
{
case 0:
- return AsBoundsChk()->gtArrLen;
- case 1:
return AsBoundsChk()->gtIndex;
+ case 1:
+ return AsBoundsChk()->gtArrLen;
default:
unreached();
}
@@ -9227,9 +9227,9 @@ GenTree** GenTreeUseEdgeIterator::GetNextUseEdge() const
switch (m_state)
{
case 0:
- return &m_node->AsBoundsChk()->gtArrLen;
- case 1:
return &m_node->AsBoundsChk()->gtIndex;
+ case 1:
+ return &m_node->AsBoundsChk()->gtArrLen;
default:
return nullptr;
}
@@ -11721,8 +11721,8 @@ void Compiler::gtDispTree(GenTreePtr tree,
printf("\n");
if (!topOnly)
{
- gtDispChild(tree->gtBoundsChk.gtArrLen, indentStack, IIArc, nullptr, topOnly);
- gtDispChild(tree->gtBoundsChk.gtIndex, indentStack, IIArcBottom, nullptr, topOnly);
+ gtDispChild(tree->gtBoundsChk.gtIndex, indentStack, IIArc, nullptr, topOnly);
+ gtDispChild(tree->gtBoundsChk.gtArrLen, indentStack, IIArcBottom, nullptr, topOnly);
}
break;
@@ -14642,8 +14642,8 @@ void Compiler::gtExtractSideEffList(GenTreePtr expr,
#endif // FEATURE_SIMD
)
{
- gtExtractSideEffList(expr->AsBoundsChk()->gtArrLen, pList, flags);
gtExtractSideEffList(expr->AsBoundsChk()->gtIndex, pList, flags);
+ gtExtractSideEffList(expr->AsBoundsChk()->gtArrLen, pList, flags);
}
if (expr->OperGet() == GT_DYN_BLK || expr->OperGet() == GT_STORE_DYN_BLK)
diff --git a/src/jit/gentree.h b/src/jit/gentree.h
index 4611d35465..7a7d4bc296 100644
--- a/src/jit/gentree.h
+++ b/src/jit/gentree.h
@@ -3764,8 +3764,8 @@ public:
struct GenTreeBoundsChk : public GenTree
{
- GenTreePtr gtArrLen; // An expression for the length of the array being indexed.
GenTreePtr gtIndex; // The index expression.
+ GenTreePtr gtArrLen; // An expression for the length of the array being indexed.
GenTreePtr gtIndRngFailBB; // Label to jump to for array-index-out-of-range
SpecialCodeKind gtThrowKind; // Kind of throw block to branch to on failure
@@ -3775,10 +3775,10 @@ struct GenTreeBoundsChk : public GenTree
optimizer has a chance of eliminating some of the rng checks */
unsigned gtStkDepth;
- GenTreeBoundsChk(genTreeOps oper, var_types type, GenTreePtr arrLen, GenTreePtr index, SpecialCodeKind kind)
+ GenTreeBoundsChk(genTreeOps oper, var_types type, GenTreePtr index, GenTreePtr arrLen, SpecialCodeKind kind)
: GenTree(oper, type)
- , gtArrLen(arrLen)
, gtIndex(index)
+ , gtArrLen(arrLen)
, gtIndRngFailBB(nullptr)
, gtThrowKind(kind)
, gtStkDepth(0)
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index d2a6843b68..856dbc597e 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -5683,7 +5683,7 @@ GenTreePtr Compiler::fgMorphArrayIndex(GenTreePtr tree)
}
GenTreeBoundsChk* arrBndsChk = new (this, GT_ARR_BOUNDS_CHECK)
- GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, arrLen, index, SCK_RNGCHK_FAIL);
+ GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, index, arrLen, SCK_RNGCHK_FAIL);
bndsChk = arrBndsChk;
@@ -14696,8 +14696,8 @@ GenTreePtr Compiler::fgMorphTree(GenTreePtr tree, MorphAddrContext* mac)
fgSetRngChkTarget(tree);
GenTreeBoundsChk* bndsChk = tree->AsBoundsChk();
- bndsChk->gtArrLen = fgMorphTree(bndsChk->gtArrLen);
bndsChk->gtIndex = fgMorphTree(bndsChk->gtIndex);
+ bndsChk->gtArrLen = fgMorphTree(bndsChk->gtArrLen);
// If the index is a comma(throw, x), just return that.
if (!optValnumCSE_phase && fgIsCommaThrow(bndsChk->gtIndex))
{
@@ -14705,8 +14705,8 @@ GenTreePtr Compiler::fgMorphTree(GenTreePtr tree, MorphAddrContext* mac)
}
// Propagate effects flags upwards
- bndsChk->gtFlags |= (bndsChk->gtArrLen->gtFlags & GTF_ALL_EFFECT);
bndsChk->gtFlags |= (bndsChk->gtIndex->gtFlags & GTF_ALL_EFFECT);
+ bndsChk->gtFlags |= (bndsChk->gtArrLen->gtFlags & GTF_ALL_EFFECT);
// Otherwise, we don't change the tree.
}
diff --git a/src/jit/optimizer.cpp b/src/jit/optimizer.cpp
index bd82f6a6f3..32ff4d3139 100644
--- a/src/jit/optimizer.cpp
+++ b/src/jit/optimizer.cpp
@@ -7662,11 +7662,11 @@ bool Compiler::optExtractArrIndex(GenTreePtr tree, ArrIndex* result, unsigned lh
return false;
}
GenTreeBoundsChk* arrBndsChk = before->AsBoundsChk();
- if (arrBndsChk->gtArrLen->gtGetOp1()->gtOper != GT_LCL_VAR)
+ if (arrBndsChk->gtIndex->gtOper != GT_LCL_VAR)
{
return false;
}
- if (arrBndsChk->gtIndex->gtOper != GT_LCL_VAR)
+ if (arrBndsChk->gtArrLen->gtGetOp1()->gtOper != GT_LCL_VAR)
{
return false;
}
diff --git a/src/jit/simd.cpp b/src/jit/simd.cpp
index e0f63c2f88..608c98659a 100644
--- a/src/jit/simd.cpp
+++ b/src/jit/simd.cpp
@@ -1793,7 +1793,7 @@ GenTreePtr Compiler::createAddressNodeForSIMDInit(GenTreePtr tree, unsigned simd
GenTreeArrLen* arrLen =
new (this, GT_ARR_LENGTH) GenTreeArrLen(TYP_INT, arrayRef, (int)offsetof(CORINFO_Array, length));
GenTreeBoundsChk* arrBndsChk = new (this, GT_ARR_BOUNDS_CHECK)
- GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, arrLen, checkIndexExpr, SCK_RNGCHK_FAIL);
+ GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, checkIndexExpr, arrLen, SCK_RNGCHK_FAIL);
offset += offsetof(CORINFO_Array, u1Elems);
byrefNode = gtNewOperNode(GT_COMMA, arrayRef->TypeGet(), arrBndsChk, gtCloneExpr(arrayRef));
@@ -2247,7 +2247,7 @@ GenTreePtr Compiler::impSIMDIntrinsic(OPCODE opcode,
GenTreeArrLen* arrLen = new (this, GT_ARR_LENGTH)
GenTreeArrLen(TYP_INT, arrayRefForArgRngChk, (int)offsetof(CORINFO_Array, length));
argRngChk = new (this, GT_ARR_BOUNDS_CHECK)
- GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, arrLen, index, op3CheckKind);
+ GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, index, arrLen, op3CheckKind);
// Now, clone op3 to create another node for the argChk
GenTree* index2 = gtCloneExpr(op3);
assert(index != nullptr);
@@ -2268,7 +2268,7 @@ GenTreePtr Compiler::impSIMDIntrinsic(OPCODE opcode,
GenTreeArrLen* arrLen = new (this, GT_ARR_LENGTH)
GenTreeArrLen(TYP_INT, arrayRefForArgChk, (int)offsetof(CORINFO_Array, length));
GenTreeBoundsChk* argChk = new (this, GT_ARR_BOUNDS_CHECK)
- GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, arrLen, checkIndexExpr, op2CheckKind);
+ GenTreeBoundsChk(GT_ARR_BOUNDS_CHECK, TYP_VOID, checkIndexExpr, arrLen, op2CheckKind);
// Create a GT_COMMA tree for the bounds check(s).
op2 = gtNewOperNode(GT_COMMA, op2->TypeGet(), argChk, op2);
@@ -2500,7 +2500,7 @@ GenTreePtr Compiler::impSIMDIntrinsic(OPCODE opcode,
GenTree* lengthNode = new (this, GT_CNS_INT) GenTreeIntCon(TYP_INT, vectorLength);
GenTreeBoundsChk* simdChk =
- new (this, GT_SIMD_CHK) GenTreeBoundsChk(GT_SIMD_CHK, TYP_VOID, lengthNode, index, SCK_RNGCHK_FAIL);
+ new (this, GT_SIMD_CHK) GenTreeBoundsChk(GT_SIMD_CHK, TYP_VOID, index, lengthNode, SCK_RNGCHK_FAIL);
// Create a GT_COMMA tree for the bounds check.
op2 = gtNewOperNode(GT_COMMA, op2->TypeGet(), simdChk, op2);
diff --git a/src/jit/valuenum.cpp b/src/jit/valuenum.cpp
index 89fc19b3b6..f31eef292f 100644
--- a/src/jit/valuenum.cpp
+++ b/src/jit/valuenum.cpp
@@ -6592,10 +6592,10 @@ void Compiler::fgValueNumberTree(GenTreePtr tree, bool evalAsgLhsInd)
// A bounds check node has no value, but may throw exceptions.
ValueNumPair excSet = vnStore->VNPExcSetSingleton(
vnStore->VNPairForFunc(TYP_REF, VNF_IndexOutOfRangeExc,
- vnStore->VNPNormVal(tree->AsBoundsChk()->gtArrLen->gtVNPair),
- vnStore->VNPNormVal(tree->AsBoundsChk()->gtIndex->gtVNPair)));
- excSet = vnStore->VNPExcSetUnion(excSet, vnStore->VNPExcVal(tree->AsBoundsChk()->gtArrLen->gtVNPair));
+ vnStore->VNPNormVal(tree->AsBoundsChk()->gtIndex->gtVNPair),
+ vnStore->VNPNormVal(tree->AsBoundsChk()->gtArrLen->gtVNPair)));
excSet = vnStore->VNPExcSetUnion(excSet, vnStore->VNPExcVal(tree->AsBoundsChk()->gtIndex->gtVNPair));
+ excSet = vnStore->VNPExcSetUnion(excSet, vnStore->VNPExcVal(tree->AsBoundsChk()->gtArrLen->gtVNPair));
tree->gtVNPair = vnStore->VNPWithExc(vnStore->VNPForVoid(), excSet);
}
diff --git a/tests/testsUnsupportedOnARM32.txt b/tests/testsUnsupportedOnARM32.txt
index 12b685527f..e827550d46 100644
--- a/tests/testsUnsupportedOnARM32.txt
+++ b/tests/testsUnsupportedOnARM32.txt
@@ -7,6 +7,5 @@ JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64/_il_dbgsizeof64.sh
JIT/Methodical/xxobj/sizeof/_il_relsizeof/_il_relsizeof.sh
JIT/Methodical/xxobj/sizeof/_il_relsizeof32/_il_relsizeof32.sh
JIT/Methodical/xxobj/sizeof/_il_relsizeof64/_il_relsizeof64.sh
-JIT/Regression/JitBlue/DevDiv_283795/DevDiv_283795/DevDiv_283795.sh
JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh
JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh
diff --git a/tests/x86_jit32_issues.targets b/tests/x86_jit32_issues.targets
index 314d918ac0..04960ea6bf 100644
--- a/tests/x86_jit32_issues.targets
+++ b/tests/x86_jit32_issues.targets
@@ -518,8 +518,5 @@
<ExcludeList Include="$(XunitTestBinBase)\JIT\Regression\JitBlue\DevDiv_255294\DevDiv_255294\DevDiv_255294.cmd">
<Issue>times out</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)\JIT\Regression\JitBlue\DevDiv_283795\DevDiv_283795\DevDiv_283795.cmd">
- <Issue>8077</Issue>
- </ExcludeList>
</ItemGroup>
</Project>
diff --git a/tests/x86_legacy_backend_issues.targets b/tests/x86_legacy_backend_issues.targets
index 4b97325db0..0c294ef7ec 100644
--- a/tests/x86_legacy_backend_issues.targets
+++ b/tests/x86_legacy_backend_issues.targets
@@ -442,8 +442,5 @@
<ExcludeList Include="$(XunitTestBinBase)\JIT\Regression\CLR-x86-JIT\V2.0-Beta2\b409748\b409748\b409748.cmd">
<Issue>needs triage</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)\JIT\Regression\JitBlue\DevDiv_283795\DevDiv_283795\DevDiv_283795.cmd">
- <Issue>8077</Issue>
- </ExcludeList>
</ItemGroup>
</Project>