Skip to content

Commit 83ed351

Browse files
committed
apply comment
1 parent f393590 commit 83ed351

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
10461046
std::back_inserter(NewInterchangeableOpcode));
10471047
if (NewInterchangeableOpcode.empty())
10481048
return false;
1049-
LHS = std::move(NewInterchangeableOpcode);
1049+
LHS.swap(NewInterchangeableOpcode);
10501050
return true;
10511051
};
10521052
for (int Cnt = 0, E = VL.size(); Cnt < E; Cnt++) {
@@ -1060,22 +1060,20 @@ static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
10601060
continue;
10611061
if (AlternateInterchangeableOpcode.empty()) {
10621062
InterchangeableOpcode.erase(
1063-
std::remove_if(InterchangeableOpcode.begin(),
1064-
InterchangeableOpcode.end(),
1065-
[](const InterchangeableInstruction &I) {
1066-
return !isValidForAlternation(I.Opcode);
1067-
}),
1063+
remove_if(InterchangeableOpcode,
1064+
[](const InterchangeableInstruction &I) {
1065+
return !isValidForAlternation(I.Opcode);
1066+
}),
10681067
InterchangeableOpcode.end());
10691068
ThisInterchangeableOpcode.erase(
1070-
std::remove_if(ThisInterchangeableOpcode.begin(),
1071-
ThisInterchangeableOpcode.end(),
1072-
[](const InterchangeableInstruction &I) {
1073-
return !isValidForAlternation(I.Opcode);
1074-
}),
1069+
remove_if(ThisInterchangeableOpcode,
1070+
[](const InterchangeableInstruction &I) {
1071+
return !isValidForAlternation(I.Opcode);
1072+
}),
10751073
ThisInterchangeableOpcode.end());
10761074
if (InterchangeableOpcode.empty() || ThisInterchangeableOpcode.empty())
10771075
return InstructionsState(VL[BaseIndex], nullptr, nullptr);
1078-
AlternateInterchangeableOpcode = std::move(ThisInterchangeableOpcode);
1076+
AlternateInterchangeableOpcode.swap(ThisInterchangeableOpcode);
10791077
continue;
10801078
}
10811079
if (UpdateInterchangeableOpcode(AlternateInterchangeableOpcode,

0 commit comments

Comments
 (0)