diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-16 21:03:24 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-16 21:03:24 +0000 | 
| commit | 7c7aba6e5fef47a01a136be655b0a92cfd7090f6 (patch) | |
| tree | 99ec531924f6078534b100ab9d7696abce848099 /lib/Target/Mips/MipsLongBranch.cpp | |
| parent | 7ab83427af0f77b59941ceba41d509d7d097b065 (diff) | |
Notes
Diffstat (limited to 'lib/Target/Mips/MipsLongBranch.cpp')
| -rw-r--r-- | lib/Target/Mips/MipsLongBranch.cpp | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/Mips/MipsLongBranch.cpp b/lib/Target/Mips/MipsLongBranch.cpp index b95f1158fa562..272595af5f6f1 100644 --- a/lib/Target/Mips/MipsLongBranch.cpp +++ b/lib/Target/Mips/MipsLongBranch.cpp @@ -274,8 +274,8 @@ void MipsLongBranch::expandToLongBranch(MBBInfo &I) {    if (IsPIC) {      MachineBasicBlock *BalTgtMBB = MF->CreateMachineBasicBlock(BB);      MF->insert(FallThroughMBB, BalTgtMBB); -    LongBrMBB->addSuccessor(BalTgtMBB); -    BalTgtMBB->addSuccessor(TgtMBB); +    LongBrMBB->addSuccessor(BalTgtMBB, BranchProbability::getOne()); +    BalTgtMBB->addSuccessor(&*FallThroughMBB, BranchProbability::getOne());      // We must select between the MIPS32r6/MIPS64r6 BAL (which is a normal      // instruction) and the pre-MIPS32r6/MIPS64r6 definition (which is an @@ -342,8 +342,8 @@ void MipsLongBranch::expandToLongBranch(MBBInfo &I) {            .addReg(Mips::SP).addImm(8);        if (Subtarget.hasMips32r6()) -        BuildMI(*BalTgtMBB, Pos, DL, TII->get(Mips::JALR)) -          .addReg(Mips::ZERO).addReg(Mips::AT); +        BuildMI(*BalTgtMBB, Pos, DL, TII->get(Mips::JALR), Mips::ZERO) +            .addReg(Mips::AT);        else          BuildMI(*BalTgtMBB, Pos, DL, TII->get(Mips::JR)).addReg(Mips::AT); @@ -415,8 +415,8 @@ void MipsLongBranch::expandToLongBranch(MBBInfo &I) {          .addReg(Mips::SP_64).addImm(0);        if (Subtarget.hasMips64r6()) -        BuildMI(*BalTgtMBB, Pos, DL, TII->get(Mips::JALR64)) -          .addReg(Mips::ZERO_64).addReg(Mips::AT_64); +        BuildMI(*BalTgtMBB, Pos, DL, TII->get(Mips::JALR64), Mips::ZERO_64) +            .addReg(Mips::AT_64);        else          BuildMI(*BalTgtMBB, Pos, DL, TII->get(Mips::JR64)).addReg(Mips::AT_64);  | 
