Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
221 | (style) if (auto*SI = dyn_cast<StoreInst>(V)) return SI->getValueOperand()->getType(); if (auto *CI = dyn_cast<CmpInst>(V)) return CI->getOperand(0)->getType(); if (auto *IE = dyn_cast<InsertElementInst>(V)) return IE->getOperand(1)->getType(); return V->getType(); |
Comment Actions
Is this really a NFC? Could some of the cases that just call getType() now call one of the dyn_cast variants?
Anyway, no objections from me - @ABataev any comments?
Comment Actions
Thank you @RKSimon for raising this question.
Regarding the code that calls ->getType() and don't have dynamic casts...
- Line 3494 can only be entered when instruction is a Instruction::Load.
- Use of line 3614 can only be used when TE.Scalars consist of Load instructions.
- Line 4909 is under case Instruction::Load
- Line 11147 is under the reduction part of SLP, by the cases in RecurKind I think load / store / cmp instructions are not involved here.
With all this said, I am not sure if any existing code will cause this "none functional change intended" patch to fail.
(style)