summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/AggressiveInstCombine
diff options
context:
space:
mode:
authorPawel Bylica <chfast@gmail.com>2019-01-02 19:51:46 +0000
committerPawel Bylica <chfast@gmail.com>2019-01-02 19:51:46 +0000
commit119aa8fa5f2489697c81d48801180744b6f00bcf (patch)
tree1f4f409bf322c77171073d76e8f94fdaed4b723f /llvm/lib/Transforms/AggressiveInstCombine
parente889ac7e6b64fc2898878d43e241050eab71ed6c (diff)
downloadbcm5719-llvm-119aa8fa5f2489697c81d48801180744b6f00bcf.tar.gz
bcm5719-llvm-119aa8fa5f2489697c81d48801180744b6f00bcf.zip
Format AggresiveInstCombine.cpp. NFC
llvm-svn: 350255
Diffstat (limited to 'llvm/lib/Transforms/AggressiveInstCombine')
-rw-r--r--llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
index a9442255e34..c795866ec0f 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
@@ -81,8 +81,8 @@ static bool foldGuardedRotateToFunnelShift(Instruction &I) {
auto Sub = m_Sub(m_SpecificInt(Width), m_Value(R1));
// rotate_left(X, Y) == (X << Y) | (X >> (Width - Y))
- auto RotL = m_OneUse(m_c_Or(m_Shl(m_Value(L0), m_Value(L1)),
- m_LShr(m_Value(R0), Sub)));
+ auto RotL = m_OneUse(
+ m_c_Or(m_Shl(m_Value(L0), m_Value(L1)), m_LShr(m_Value(R0), Sub)));
if (RotL.match(V) && L0 == R0 && L1 == R1) {
X = L0;
Y = L1;
@@ -90,8 +90,8 @@ static bool foldGuardedRotateToFunnelShift(Instruction &I) {
}
// rotate_right(X, Y) == (X >> Y) | (X << (Width - Y))
- auto RotR = m_OneUse(m_c_Or(m_LShr(m_Value(L0), m_Value(L1)),
- m_Shl(m_Value(R0), Sub)));
+ auto RotR = m_OneUse(
+ m_c_Or(m_LShr(m_Value(L0), m_Value(L1)), m_Shl(m_Value(R0), Sub)));
if (RotR.match(V) && L0 == R0 && L1 == R1) {
X = L0;
Y = L1;
@@ -124,8 +124,8 @@ static bool foldGuardedRotateToFunnelShift(Instruction &I) {
Instruction *TermI = GuardBB->getTerminator();
BasicBlock *TrueBB, *FalseBB;
ICmpInst::Predicate Pred;
- if (!match(TermI, m_Br(m_ICmp(Pred, m_Specific(RotAmt), m_ZeroInt()),
- TrueBB, FalseBB)))
+ if (!match(TermI, m_Br(m_ICmp(Pred, m_Specific(RotAmt), m_ZeroInt()), TrueBB,
+ FalseBB)))
return false;
BasicBlock *PhiBB = Phi.getParent();
@@ -162,9 +162,9 @@ struct MaskOps {
bool MatchAndChain;
bool FoundAnd1;
- MaskOps(unsigned BitWidth, bool MatchAnds) :
- Root(nullptr), Mask(APInt::getNullValue(BitWidth)),
- MatchAndChain(MatchAnds), FoundAnd1(false) {}
+ MaskOps(unsigned BitWidth, bool MatchAnds)
+ : Root(nullptr), Mask(APInt::getNullValue(BitWidth)),
+ MatchAndChain(MatchAnds), FoundAnd1(false) {}
};
/// This is a recursive helper for foldAnyOrAllBitsSet() that walks through a
@@ -245,8 +245,8 @@ static bool foldAnyOrAllBitsSet(Instruction &I) {
IRBuilder<> Builder(&I);
Constant *Mask = ConstantInt::get(I.getType(), MOps.Mask);
Value *And = Builder.CreateAnd(MOps.Root, Mask);
- Value *Cmp = MatchAllBitsSet ? Builder.CreateICmpEQ(And, Mask) :
- Builder.CreateIsNotNull(And);
+ Value *Cmp = MatchAllBitsSet ? Builder.CreateICmpEQ(And, Mask)
+ : Builder.CreateIsNotNull(And);
Value *Zext = Builder.CreateZExt(Cmp, I.getType());
I.replaceAllUsesWith(Zext);
return true;
OpenPOWER on IntegriCloud