Skip to content

Commit 0fb9f89

Browse files
[InstCombine] Initialize a SmallVector with a range (NFC) (#100947)
1 parent 4121191 commit 0fb9f89

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,10 +1500,7 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
15001500
// Don't try to simplify calls without uses. It will not do anything useful,
15011501
// but will result in the following folds being skipped.
15021502
if (!CI.use_empty()) {
1503-
SmallVector<Value *, 8> Args;
1504-
Args.reserve(CI.arg_size());
1505-
for (Value *Op : CI.args())
1506-
Args.push_back(Op);
1503+
SmallVector<Value *, 8> Args(CI.args());
15071504
if (Value *V = simplifyCall(&CI, CI.getCalledOperand(), Args,
15081505
SQ.getWithInstruction(&CI)))
15091506
return replaceInstUsesWith(CI, V);

0 commit comments

Comments
 (0)