mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 01:42:09 +00:00
Fixed issue with microMIPS long branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195965 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb5a560e00
commit
ee7f913c98
@ -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;
|
||||
|
16437
test/MC/Mips/micromips-long-branch.ll
Normal file
16437
test/MC/Mips/micromips-long-branch.ll
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user