Skip to content

Commit 1af7e4f

Browse files
committed
fix format
Change-Id: Ib32faccfafde6ab9793320eb7bf8d27bc8f14ec0
1 parent 83bb542 commit 1af7e4f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,10 +2077,10 @@ class BoUpSLP {
20772077

20782078
OptimizationRemarkEmitter *getORE() { return ORE; }
20792079

2080-
static SmallVector<Value*, 8> setIdentityInstr(ArrayRef<Value *> VL) {
2080+
static SmallVector<Value *, 8> setIdentityInstr(ArrayRef<Value *> VL) {
20812081
SmallVector<Value *, 8> New_VL(VL.begin(), VL.end());
2082-
if (VL.size() <= 2)
2083-
return New_VL;
2082+
if (VL.size() <= 2)
2083+
return New_VL;
20842084
auto It = find_if(VL, IsaPred<Instruction>);
20852085
if (It == VL.end())
20862086
return New_VL;
@@ -2096,20 +2096,22 @@ class BoUpSLP {
20962096
}
20972097
Instruction *MainOp = cast<Instruction>(*It);
20982098
auto ValidOperands = count_if(VL, IsaPred<Instruction, PoisonValue>);
2099-
if (ValidOperands != (int) VL.size()-1)
2099+
if (ValidOperands != (int)VL.size() - 1)
21002100
return New_VL;
21012101
auto DifferentOperand = find_if_not(VL, IsaPred<Instruction, PoisonValue>);
21022102
if (DifferentOperand == VL.end())
21032103
return New_VL;
2104-
assert(!isa<Instruction>(*DifferentOperand) && !isa<PoisonValue>(*DifferentOperand) &&
2105-
"Expected different operand to be not an instruction");
2104+
assert(!isa<Instruction>(*DifferentOperand) &&
2105+
!isa<PoisonValue>(*DifferentOperand) &&
2106+
"Expected different operand to be not an instruction");
21062107
auto FoundIdentityInstrIt = IdentityInstrsMp.find(*DifferentOperand);
21072108
if (FoundIdentityInstrIt != IdentityInstrsMp.end()) {
21082109
auto OperandIndex = std::distance(VL.begin(), DifferentOperand);
21092110
New_VL[OperandIndex] = FoundIdentityInstrIt->second;
21102111
return New_VL;
21112112
}
2112-
auto *Identity = ConstantExpr::getIdentity(MainOp, MainOp->getType(), true /*AllowRHSConstant*/);
2113+
auto *Identity = ConstantExpr::getIdentity(MainOp, MainOp->getType(),
2114+
true /*AllowRHSConstant*/);
21132115
if (!Identity)
21142116
return New_VL;
21152117
auto *NewInstr = MainOp->clone();
@@ -2120,8 +2122,8 @@ class BoUpSLP {
21202122
auto OperandIndex = std::distance(VL.begin(), DifferentOperand);
21212123
New_VL[OperandIndex] = NewInstr;
21222124
assert(find_if_not(New_VL, IsaPred<Instruction, PoisonValue>) ==
2123-
New_VL.end() &&
2124-
"Expected all operands to be instructions");
2125+
New_VL.end() &&
2126+
"Expected all operands to be instructions");
21252127
IdentityInstrsMp.try_emplace(*DifferentOperand, NewInstr);
21262128
return New_VL;
21272129
}
@@ -4136,7 +4138,7 @@ class BoUpSLP {
41364138
"Reshuffling scalars not yet supported for nodes with padding");
41374139
Last->ReuseShuffleIndices.append(ReuseShuffleIndices.begin(),
41384140
ReuseShuffleIndices.end());
4139-
SmallVector<Value*, 8> NewVL =BoUpSLP::setIdentityInstr(VL);
4141+
SmallVector<Value *, 8> NewVL = BoUpSLP::setIdentityInstr(VL);
41404142
if (ReorderIndices.empty()) {
41414143
Last->Scalars.assign(NewVL.begin(), NewVL.end());
41424144
if (S)

0 commit comments

Comments
 (0)