[PATCH] D46026: [ICP] Do not attempt type matching for variable length arguments.
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 24 13:00:54 PDT 2018
mssimpso added a comment.
Thanks for catching this bug! Yep, it was introduced with the refactoring done in https://reviews.llvm.org/D40658. I just have one minor comment.
================
Comment at: lib/Transforms/Utils/CallPromotionUtils.cpp:394
+ auto CalleeParamNum = CalleeType->getNumParams();
for (Use &U : CS.args()) {
unsigned ArgNo = CS.getArgumentNo(&U);
----------------
It's probably more straightforward to rewrite the loop like what's below, instead of adding the check inside the loop.
```
for (unsigned ArgNo = 0; ArgNo < CalleeParamNum; ++ArgNo) {
...
}
```
Repository:
rL LLVM
https://reviews.llvm.org/D46026
More information about the llvm-commits
mailing list