Simplify code, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31097 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp
index 941229d..76cb7ed 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -253,12 +253,10 @@
return;
}
- // Conditional branch
+ // Two-way Conditional Branch.
BuildMI(&MBB, PPC::COND_BRANCH, 3)
.addReg(Cond[0].getReg()).addImm(Cond[1].getImm()).addMBB(TBB);
-
- if (FBB) // Two-way branch.
- BuildMI(&MBB, PPC::B, 1).addMBB(FBB);
+ BuildMI(&MBB, PPC::B, 1).addMBB(FBB);
}
bool PPCInstrInfo::
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp
index 0cc4c39..29cda24 100644
--- a/lib/Target/X86/X86InstrInfo.cpp
+++ b/lib/Target/X86/X86InstrInfo.cpp
@@ -389,12 +389,10 @@
return;
}
- // Conditional branch.
+ // Two-way Conditional branch.
unsigned Opc = GetCondBranchFromCond((X86::CondCode)Cond[0].getImm());
BuildMI(&MBB, Opc, 1).addMBB(TBB);
-
- if (FBB) // Two-way branch.
- BuildMI(&MBB, X86::JMP, 1).addMBB(FBB);
+ BuildMI(&MBB, X86::JMP, 1).addMBB(FBB);
}
bool X86InstrInfo::