@@ -907,43 +907,7 @@ GlobOpt::ToTypeSpec(BVSparse<JitArenaAllocator> *bv, BasicBlock *block, IRType t
907
907
}
908
908
909
909
IR::RegOpnd *newOpnd = IR::RegOpnd::New(stackSym, fromType, this->func);
910
- IR::Instr *lastInstr = block->GetLastInstr();
911
910
912
- if (!insertBeforeInstr && lastInstr->IsBranchInstr())
913
- {
914
- // If branch is using this symbol, hoist the operand as the ToInt32 load will get
915
- // inserted right before the branch.
916
- IR::Instr *instrPrev = lastInstr->m_prev;
917
- IR::Opnd *src1 = lastInstr->GetSrc1();
918
- if (src1)
919
- {
920
- if (src1->IsRegOpnd() && src1->AsRegOpnd()->m_sym == stackSym)
921
- {
922
- lastInstr->HoistSrc1(Js::OpCode::Ld_A);
923
- }
924
- IR::Opnd *src2 = lastInstr->GetSrc2();
925
- if (src2)
926
- {
927
- if (src2->IsRegOpnd() && src2->AsRegOpnd()->m_sym == stackSym)
928
- {
929
- lastInstr->HoistSrc2(Js::OpCode::Ld_A);
930
- }
931
- }
932
-
933
- // Did we insert anything?
934
- if (lastInstr->m_prev != instrPrev)
935
- {
936
- // If we had ByteCodeUses right before the branch, move them back down.
937
- IR::Instr *insertPoint = lastInstr;
938
- for (IR::Instr *instrBytecode = instrPrev; instrBytecode->m_opcode == Js::OpCode::ByteCodeUses; instrBytecode = instrBytecode->m_prev)
939
- {
940
- instrBytecode->Unlink();
941
- insertPoint->InsertBefore(instrBytecode);
942
- insertPoint = instrBytecode;
943
- }
944
- }
945
- }
946
- }
947
911
this->ToTypeSpecUse(nullptr, newOpnd, block, nullptr, nullptr, toType, bailOutKind, lossy, insertBeforeInstr);
948
912
} NEXT_BITSET_IN_SPARSEBV;
949
913
}
0 commit comments