diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-03-20 16:47:53 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-03-20 16:47:53 +0000 |
commit | a2250e923b3926471c9dfdf163c4b134b0c2918a (patch) | |
tree | 4c489a40f093c2308e5496c9a79c90601ac507bf /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 76b178d9496ea8bf2f04f9b6b5839e62f7211508 (diff) | |
download | bcm5719-llvm-a2250e923b3926471c9dfdf163c4b134b0c2918a.tar.gz bcm5719-llvm-a2250e923b3926471c9dfdf163c4b134b0c2918a.zip |
[CGP] fix formatting; NFC
llvm-svn: 356572
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 68bab28c0b7..85c1dc4ec87 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -1183,9 +1183,10 @@ static bool replaceMathCmpWithIntrinsic(BinaryOperator *BO, CmpInst *Cmp, // Check that the insertion doesn't create a value that is live across more // than two blocks, so to minimise the increase in register pressure. - if (BO->getParent() != Cmp->getParent()) { - BasicBlock *Dominator = MathDominates ? BO->getParent() : Cmp->getParent(); - BasicBlock *Dominated = MathDominates ? Cmp->getParent() : BO->getParent(); + BasicBlock *MathBB = BO->getParent(), *CmpBB = Cmp->getParent(); + if (MathBB != CmpBB) { + BasicBlock *Dominator = MathDominates ? MathBB : CmpBB; + BasicBlock *Dominated = MathDominates ? CmpBB : MathBB; auto Successors = successors(Dominator); if (llvm::find(Successors, Dominated) == Successors.end()) return false; |