Skip to content

Commit 01c1c78

Browse files
[Scalar] Construct SmallVector with an iterator range (NFC) (#135725)
1 parent eb7f514 commit 01c1c78

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Scalar/NewGVN.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,8 +3195,7 @@ bool NewGVN::singleReachablePHIPath(
31953195
};
31963196
auto FilteredPhiArgs =
31973197
make_filter_range(MP->operands(), ReachableOperandPred);
3198-
SmallVector<const Value *, 32> OperandList;
3199-
llvm::copy(FilteredPhiArgs, std::back_inserter(OperandList));
3198+
SmallVector<const Value *, 32> OperandList(FilteredPhiArgs);
32003199
bool Okay = all_equal(OperandList);
32013200
if (Okay)
32023201
return singleReachablePHIPath(Visited, cast<MemoryAccess>(OperandList[0]),

0 commit comments

Comments
 (0)