2
0
Эх сурвалжийг харах

Fix type assert in DbCheckPostLower hitting in swb branch

Meghana Gupta 9 жил өмнө
parent
commit
5ae6e7ee78

+ 0 - 6
lib/Backend/DbCheckPostLower.cpp

@@ -141,11 +141,6 @@ DbCheckPostLower::Check()
             this->Check(instr->GetSrc1());
             this->Check(instr->GetSrc2());
 
-#if defined(_M_IX86) || defined(_M_X64)
-            if (EncoderMD::IsOPEQ(instr))
-            {
-                Assert(instr->GetDst()->IsEqual(instr->GetSrc1()));
-            }
 #if defined(_M_IX86) || defined(_M_X64)
             // for op-eq's and assignment operators, make  sure the types match
             // for shift operators make sure the types match and the third is an 8-bit immediate
@@ -167,7 +162,6 @@ DbCheckPostLower::Check()
             }
             Assert(!LowererMD::IsAssign(instr) || instr->GetDst()->GetSize() == instr->GetSrc1()->GetSize());
             Assert(instr->m_opcode != Js::OpCode::CMP || instr->GetSrc1()->GetType() == instr->GetSrc1()->GetType());
-#endif
 
             switch (instr->m_opcode)
             {

+ 1 - 1
lib/Backend/LowerMDShared.cpp

@@ -4783,7 +4783,7 @@ LowererMD::GenerateWriteBarrier(IR::Opnd * writeBarrierAddrRegOpnd, IR::Instr *
     insertBeforeInstr->InsertBefore(loadIndexInstr);
 
     IR::Instr * shiftBitInstr = IR::Instr::New(Js::OpCode::SHR, indexOpnd, indexOpnd,
-        IR::IntConstOpnd::New(12 /* 1 << 12 = 4096 */, TyInt32, insertBeforeInstr->m_func), insertBeforeInstr->m_func);
+        IR::IntConstOpnd::New(12 /* 1 << 12 = 4096 */, TyInt8, insertBeforeInstr->m_func), insertBeforeInstr->m_func);
     insertBeforeInstr->InsertBefore(shiftBitInstr);
 
     IR::RegOpnd * cardTableRegOpnd = IR::RegOpnd::New(TyMachReg, insertBeforeInstr->m_func);