[llvm] [InstCombine] Use more inline elements in a SmallVector (PR #100942)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 28 13:46:45 PDT 2024
================
@@ -1500,7 +1500,7 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
// Don't try to simplify calls without uses. It will not do anything useful,
// but will result in the following folds being skipped.
if (!CI.use_empty()) {
- SmallVector<Value *, 4> Args;
+ SmallVector<Value *, 8> Args;
----------------
kazutakahirata wrote:
Yes, thank you for bringing this up. It can actually be even shorter:
```
SmallVector<Value *, 8> Args(CI.args());
```
I'll post a follow-up PR.
https://github.com/llvm/llvm-project/pull/100942
More information about the llvm-commits
mailing list