diff --git a/src/coreclr/jit/codegenarmarch.cpp b/src/coreclr/jit/codegenarmarch.cpp index a486b59f49646..a706893053fd5 100644 --- a/src/coreclr/jit/codegenarmarch.cpp +++ b/src/coreclr/jit/codegenarmarch.cpp @@ -144,7 +144,7 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode) if (treeNode->IsReuseRegVal()) { // For now, this is only used for constant nodes. - assert((treeNode->OperGet() == GT_CNS_INT) || (treeNode->OperGet() == GT_CNS_DBL)); + assert(treeNode->OperIs(GT_CNS_INT, GT_CNS_DBL, GT_CNS_VEC)); JITDUMP(" TreeNode is marked ReuseReg\n"); return; } diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index deb97db21bc43..38921927f2091 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -2695,6 +2695,7 @@ bool LinearScan::isMatchingConstant(RegRecord* physRegRecord, RefPosition* refPo } break; } + case GT_CNS_DBL: { // For floating point constants, the values must be identical, not simply compare @@ -2706,6 +2707,12 @@ bool LinearScan::isMatchingConstant(RegRecord* physRegRecord, RefPosition* refPo } break; } + + case GT_CNS_VEC: + { + return GenTreeVecCon::Equals(refPosition->treeNode->AsVecCon(), otherTreeNode->AsVecCon()); + } + default: break; } diff --git a/src/coreclr/jit/lsraxarch.cpp b/src/coreclr/jit/lsraxarch.cpp index f85ad2aa72b92..5386ed5769558 100644 --- a/src/coreclr/jit/lsraxarch.cpp +++ b/src/coreclr/jit/lsraxarch.cpp @@ -147,6 +147,7 @@ int LinearScan::BuildNode(GenTree* tree) case GT_CNS_INT: case GT_CNS_LNG: case GT_CNS_DBL: + case GT_CNS_VEC: { srcCount = 0; assert(dstCount == 1);