forked from OSchip/llvm-project
[LV] Do not rely on InductionDescriptor::getCastInsts. (NFC)
Now that CastDef is passed as VPValue, there is no need to access ID.getCastInsts, as CastDef can instead be checked.
This commit is contained in:
parent
4fb0805c65
commit
93931d78cf
|
@ -2391,9 +2391,13 @@ void InnerLoopVectorizer::recordVectorLoopValueForInductionCast(
|
|||
if (isa<TruncInst>(EntryVal))
|
||||
return;
|
||||
|
||||
const SmallVectorImpl<Instruction *> &Casts = ID.getCastInsts();
|
||||
if (Casts.empty())
|
||||
if (!CastDef) {
|
||||
assert(ID.getCastInsts().empty() &&
|
||||
"there are casts for ID, but no CastDef");
|
||||
return;
|
||||
}
|
||||
assert(!ID.getCastInsts().empty() &&
|
||||
"there is a CastDef, but no casts for ID");
|
||||
// Only the first Cast instruction in the Casts vector is of interest.
|
||||
// The rest of the Casts (if exist) have no uses outside the
|
||||
// induction update chain itself.
|
||||
|
|
Loading…
Reference in New Issue