parent
664711188f
commit
9d86e26e62
|
@ -437,8 +437,10 @@ bool MipsLongBranch::runOnMachineFunction(MachineFunction &F) {
|
|||
if (!I->Br || I->HasLongBranch)
|
||||
continue;
|
||||
|
||||
int ShVal = TM.getSubtarget<MipsSubtarget>().inMicroMipsMode() ? 2 : 4;
|
||||
|
||||
// Check if offset fits into 16-bit immediate field of branches.
|
||||
if (!ForceLongBranch && isInt<16>(computeOffset(I->Br) / 4))
|
||||
if (!ForceLongBranch && isInt<16>(computeOffset(I->Br) / ShVal))
|
||||
continue;
|
||||
|
||||
I->HasLongBranch = true;
|
||||
|
|
Loading…
Reference in New Issue