Skip to content

Commit 61bd641

Browse files
committed
Fix typo, use TypeInfo in assert
1 parent 7fc4859 commit 61bd641

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2380,8 +2380,8 @@ void VPlanTransforms::createInterleaveGroups(
23802380
}
23812381
}
23822382

2383-
/// Expand a VPWidenIntOrFpInduction into executable recipes. for the initial
2384-
/// value, phi and backedge value. In the followng example:
2383+
/// Expand a VPWidenIntOrFpInduction into executable recipes, for the initial
2384+
/// value, phi and backedge value. In the following example:
23852385
///
23862386
/// vector.ph:
23872387
/// Successor(s): vector loop
@@ -2399,15 +2399,15 @@ void VPlanTransforms::createInterleaveGroups(
23992399
/// vector.ph:
24002400
/// ...
24012401
/// vp<%induction> = ...
2402-
/// vp<%inc> = ...
2402+
/// vp<%induction.increment> = ...
24032403
///
24042404
/// Successor(s): vector loop
24052405
///
24062406
/// <x1> vector loop: {
24072407
/// vector.body:
24082408
/// ir<%i> = WIDEN-PHI vp<%induction>, vp<%vec.ind.next>
24092409
/// ...
2410-
/// vp<%vec.ind.next> = add ir<%i>, vp<%inc>
2410+
/// vp<%vec.ind.next> = add ir<%i>, vp<%induction.increment>
24112411
/// EMIT branch-on-count ...
24122412
/// No successors
24132413
/// }
@@ -2442,7 +2442,7 @@ expandVPWidenIntOrFpInduction(VPWidenIntOrFpInductionRecipe *WidenIVR,
24422442
// If the phi is truncated, truncate the start and step values.
24432443
VPBuilder Builder(Plan->getVectorPreheader());
24442444
if (isa<TruncInst>(IV)) {
2445-
assert(Start->getUnderlyingValue()->getType()->isIntegerTy() &&
2445+
assert(TypeInfo.inferScalarType(Start)->isIntegerTy() &&
24462446
"Truncation requires an integer type");
24472447
Step = Builder.createScalarCast(Instruction::Trunc, Step, Ty, DL);
24482448
Start = Builder.createScalarCast(Instruction::Trunc, Start, Ty, DL);

0 commit comments

Comments
 (0)