Skip to content

Commit

Permalink
[SimplifyCFG] fix formatting; NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
rotateright committed Mar 13, 2020
1 parent 51e53af commit 94f5d73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Expand Up @@ -2132,13 +2132,12 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB,
continue;

// Create a select whose true value is the speculatively executed value and
// false value is the preexisting value. Swap them if the branch
// false value is the pre-existing value. Swap them if the branch
// destinations were inverted.
Value *TrueV = ThenV, *FalseV = OrigV;
if (Invert)
std::swap(TrueV, FalseV);
Value *V = Builder.CreateSelect(
BrCond, TrueV, FalseV, "spec.select", BI);
Value *V = Builder.CreateSelect(BrCond, TrueV, FalseV, "spec.select", BI);
PN.setIncomingValue(OrigI, V);
PN.setIncomingValue(ThenI, V);
}
Expand Down

0 comments on commit 94f5d73

Please sign in to comment.