summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit')
-rwxr-xr-xsrc/jit/codegenxarch.cpp6
-rw-r--r--src/jit/emitxarch.cpp3
-rw-r--r--src/jit/flowgraph.cpp4
-rw-r--r--src/jit/gcencode.cpp4
-rw-r--r--src/jit/objectalloc.cpp6
5 files changed, 20 insertions, 3 deletions
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 5e3506790f..e61630541e 100755
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -3489,8 +3489,12 @@ void CodeGen::genCodeForInitBlkUnroll(GenTreeInitBlk* initBlkNode)
if (initVal->gtIntCon.gtIconVal != 0)
{
- emit->emitIns_R_R(INS_mov_i2xmm, EA_8BYTE, tmpReg, valReg);
+ emit->emitIns_R_R(INS_mov_i2xmm, EA_PTRSIZE, tmpReg, valReg);
emit->emitIns_R_R(INS_punpckldq, EA_8BYTE, tmpReg, tmpReg);
+#ifdef _TARGET_X86_
+ // For x86, we need one more to convert it from 8 bytes to 16 bytes.
+ emit->emitIns_R_R(INS_punpckldq, EA_8BYTE, tmpReg, tmpReg);
+#endif // _TARGET_X86_
}
else
{
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp
index f9ab5975e8..d43f766ee8 100644
--- a/src/jit/emitxarch.cpp
+++ b/src/jit/emitxarch.cpp
@@ -75,7 +75,8 @@ bool emitter::IsThreeOperandBinaryAVXInstruction(instruction ins)
ins == INS_maxss || ins == INS_maxsd || ins == INS_andnps || ins == INS_andnpd || ins == INS_paddb ||
ins == INS_paddw || ins == INS_paddd || ins == INS_paddq || ins == INS_psubb || ins == INS_psubw ||
ins == INS_psubd || ins == INS_psubq || ins == INS_pmuludq || ins == INS_pxor || ins == INS_pmaxub ||
- ins == INS_pminub || ins == INS_pmaxsw || ins == INS_pminsw || ins == INS_insertps || ins == INS_vinsertf128
+ ins == INS_pminub || ins == INS_pmaxsw || ins == INS_pminsw || ins == INS_insertps || ins == INS_vinsertf128 ||
+ ins == INS_punpckldq
);
}
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index a1d4aafc4e..ced582b30a 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -14170,6 +14170,10 @@ bool Compiler::fgOptimizeBranch(BasicBlock* bJump)
/* Mark the jump dest block as being a jump target */
bJump->bbJumpDest->bbFlags |= BBF_JMP_TARGET | BBF_HAS_LABEL;
+ // We need to update the following flags of the bJump block if they were set in the bbJumpDest block
+ bJump->bbFlags |= (bJump->bbJumpDest->bbFlags
+ & (BBF_HAS_NEWOBJ | BBF_HAS_NEWARRAY | BBF_HAS_NULLCHECK | BBF_HAS_IDX_LEN | BBF_HAS_VTABREF));
+
/* Update bbRefs and bbPreds */
// bJump now falls through into the next block
diff --git a/src/jit/gcencode.cpp b/src/jit/gcencode.cpp
index fbd51bb31c..a9f4a90ddc 100644
--- a/src/jit/gcencode.cpp
+++ b/src/jit/gcencode.cpp
@@ -1777,7 +1777,11 @@ size_t GCInfo::gcMakeRegPtrTable(BYTE* dest, int mask, const InfoHdr& header, un
*/
/* Has this argument been enregistered? */
+#ifndef LEGACY_BACKEND
+ if (!varDsc->lvOnFrame)
+#else // LEGACY_BACKEND
if (varDsc->lvRegister)
+#endif // LEGACY_BACKEND
{
/* if a CEE_JMP has been used, then we need to report all the arguments
even if they are enregistered, since we will be using this value
diff --git a/src/jit/objectalloc.cpp b/src/jit/objectalloc.cpp
index 1921e20afc..2e19f4378d 100644
--- a/src/jit/objectalloc.cpp
+++ b/src/jit/objectalloc.cpp
@@ -66,10 +66,13 @@ void ObjectAllocator::MorphAllocObjNodes()
foreach_block(comp, block)
{
- if ((block->bbFlags & BBF_HAS_NEWOBJ) == 0)
+ const bool basicBlockHasNewObj = (block->bbFlags & BBF_HAS_NEWOBJ) == BBF_HAS_NEWOBJ;
+#ifndef DEBUG
+ if (!basicBlockHasNewObj)
{
continue;
}
+#endif // DEBUG
for (GenTreeStmt* stmt = block->firstStmt(); stmt; stmt = stmt->gtNextStmt)
{
@@ -90,6 +93,7 @@ void ObjectAllocator::MorphAllocObjNodes()
if (canonicalAllocObjFound)
{
+ assert(basicBlockHasNewObj);
//------------------------------------------------------------------------
// We expect the following expression tree at this point
// * GT_STMT void (top level)