Skip to content

Commit 39c310f

Browse files
committed
[MERGE #4828 @Cellule] Remove old unused SHLD lower path
Merge pull request #4828 from Cellule:shld
2 parents cc5b412 + c36e1cf commit 39c310f

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

lib/Backend/Backend.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@
4444
// Defines
4545
//
4646

47-
// The shld optimization is bad for AMD hardware
48-
// The lack of it is ameliorated for Intel hardware by adding BTS optimization
49-
#undef SHIFTLOAD
50-
5147
#define Fatal() Js::Throw::FatalInternalError()
5248

5349
// By default, do encode large user constants for security.

lib/Backend/LowerMDShared.cpp

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3802,14 +3802,6 @@ LowererMD::GenerateSmIntPairTest(
38023802
else
38033803
{
38043804
opndReg = IR::RegOpnd::New(TyMachReg, this->m_func);
3805-
#ifdef SHIFTLOAD
3806-
3807-
instr = IR::Instr::New(Js::OpCode::SHLD, opndReg, opndSrc1, IR::IntConstOpnd::New(16, TyInt8, this->m_func), this->m_func);
3808-
instrInsert->InsertBefore(instr);
3809-
3810-
instr = IR::Instr::New(Js::OpCode::SHLD, opndReg, opndSrc2, IR::IntConstOpnd::New(16, TyInt8, this->m_func), this->m_func);
3811-
instrInsert->InsertBefore(instr);
3812-
#else
38133805
IR::Opnd * opndReg1;
38143806

38153807
// s1 = MOV src1
@@ -3845,7 +3837,7 @@ LowererMD::GenerateSmIntPairTest(
38453837

38463838
instr = IR::Instr::New(Js::OpCode::OR, opndReg, opndReg, opndReg1, this->m_func);
38473839
instrInsert->InsertBefore(instr);
3848-
#endif
3840+
38493841
opndReg = opndReg->UseWithNewType(TyInt32, this->m_func)->AsRegOpnd();
38503842

38513843
// CMP s1, AtomTag_Pair
@@ -6414,24 +6406,6 @@ void LowererMD::GenerateSmIntTest(IR::Opnd *opndSrc, IR::Instr *insertInstr, IR:
64146406

64156407
IR::Opnd * opndReg = IR::RegOpnd::New(TyMachReg, this->m_func);
64166408

6417-
#ifdef SHIFTLOAD
6418-
// s1 = SHLD src1, 16 - Shift top 16-bits of src1 to s1
6419-
IR::Instr* instr = IR::Instr::New(Js::OpCode::SHLD, opndReg, opndSrc, IR::IntConstOpnd::New(16, TyInt8, this->m_func), this->m_func);
6420-
insertInstr->InsertBefore(instr);
6421-
6422-
if (instrFirst)
6423-
{
6424-
*instrFirst = instr;
6425-
}
6426-
6427-
// CMP s1.i16, AtomTag.i16
6428-
IR::Opnd *opndReg16 = opndReg->Copy(m_func);
6429-
opndReg16->SetType(TyInt16);
6430-
instr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
6431-
instr->SetSrc1(opndReg16);
6432-
instr->SetSrc2(IR::IntConstOpnd::New(Js::AtomTag, TyInt16, this->m_func, /* dontEncode = */ true));
6433-
insertInstr->InsertBefore(instr);
6434-
#else
64356409
// s1 = MOV src1 - Move to a temporary
64366410
IR::Instr * instr = IR::Instr::New(Js::OpCode::MOV, opndReg, opndSrc, this->m_func);
64376411
insertInstr->InsertBefore(instr);
@@ -6450,7 +6424,7 @@ void LowererMD::GenerateSmIntTest(IR::Opnd *opndSrc, IR::Instr *insertInstr, IR:
64506424
instr->SetSrc1(opndReg);
64516425
instr->SetSrc2(IR::IntConstOpnd::New(Js::AtomTag, TyInt32, this->m_func, /* dontEncode = */ true));
64526426
insertInstr->InsertBefore(instr);
6453-
#endif
6427+
64546428
if(fContinueLabel)
64556429
{
64566430
// JEQ $labelHelper

0 commit comments

Comments
 (0)