Skip to content

Commit 5ae6e7e

Browse files
author
Meghana Gupta
committed
Fix type assert in DbCheckPostLower hitting in swb branch
1 parent 9565870 commit 5ae6e7e

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

lib/Backend/DbCheckPostLower.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ DbCheckPostLower::Check()
141141
this->Check(instr->GetSrc1());
142142
this->Check(instr->GetSrc2());
143143

144-
#if defined(_M_IX86) || defined(_M_X64)
145-
if (EncoderMD::IsOPEQ(instr))
146-
{
147-
Assert(instr->GetDst()->IsEqual(instr->GetSrc1()));
148-
}
149144
#if defined(_M_IX86) || defined(_M_X64)
150145
// for op-eq's and assignment operators, make sure the types match
151146
// for shift operators make sure the types match and the third is an 8-bit immediate
@@ -167,7 +162,6 @@ DbCheckPostLower::Check()
167162
}
168163
Assert(!LowererMD::IsAssign(instr) || instr->GetDst()->GetSize() == instr->GetSrc1()->GetSize());
169164
Assert(instr->m_opcode != Js::OpCode::CMP || instr->GetSrc1()->GetType() == instr->GetSrc1()->GetType());
170-
#endif
171165

172166
switch (instr->m_opcode)
173167
{

lib/Backend/LowerMDShared.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4783,7 +4783,7 @@ LowererMD::GenerateWriteBarrier(IR::Opnd * writeBarrierAddrRegOpnd, IR::Instr *
47834783
insertBeforeInstr->InsertBefore(loadIndexInstr);
47844784

47854785
IR::Instr * shiftBitInstr = IR::Instr::New(Js::OpCode::SHR, indexOpnd, indexOpnd,
4786-
IR::IntConstOpnd::New(12 /* 1 << 12 = 4096 */, TyInt32, insertBeforeInstr->m_func), insertBeforeInstr->m_func);
4786+
IR::IntConstOpnd::New(12 /* 1 << 12 = 4096 */, TyInt8, insertBeforeInstr->m_func), insertBeforeInstr->m_func);
47874787
insertBeforeInstr->InsertBefore(shiftBitInstr);
47884788

47894789
IR::RegOpnd * cardTableRegOpnd = IR::RegOpnd::New(TyMachReg, insertBeforeInstr->m_func);

0 commit comments

Comments
 (0)