@@ -638,9 +638,6 @@ class InnerLoopVectorizer {
638
638
// / there can be multiple exiting edges reaching this block.
639
639
BasicBlock *LoopExitBlock;
640
640
641
- // / The scalar loop body.
642
- BasicBlock *LoopScalarBody;
643
-
644
641
// / A list of all bypass blocks. The first block is the entry of the loop.
645
642
SmallVector<BasicBlock *, 4 > LoopBypassBlocks;
646
643
@@ -2530,7 +2527,6 @@ BasicBlock *InnerLoopVectorizer::emitMemRuntimeChecks(BasicBlock *Bypass) {
2530
2527
}
2531
2528
2532
2529
void InnerLoopVectorizer::createVectorLoopSkeleton (StringRef Prefix) {
2533
- LoopScalarBody = OrigLoop->getHeader ();
2534
2530
LoopVectorPreHeader = OrigLoop->getLoopPreheader ();
2535
2531
assert (LoopVectorPreHeader && " Invalid loop structure" );
2536
2532
LoopExitBlock = OrigLoop->getUniqueExitBlock (); // may be nullptr
@@ -2944,20 +2940,19 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State,
2944
2940
2945
2941
// Set/update profile weights for the vector and remainder loops as original
2946
2942
// loop iterations are now distributed among them. Note that original loop
2947
- // represented by LoopScalarBody becomes remainder loop after vectorization.
2943
+ // becomes the scalar remainder loop after vectorization.
2948
2944
//
2949
2945
// For cases like foldTailByMasking() and requiresScalarEpiloque() we may
2950
2946
// end up getting slightly roughened result but that should be OK since
2951
2947
// profile is not inherently precise anyway. Note also possible bypass of
2952
2948
// vector code caused by legality checks is ignored, assigning all the weight
2953
2949
// to the vector loop, optimistically.
2954
2950
//
2955
- // For scalable vectorization we can't know at compile time how many iterations
2956
- // of the loop are handled in one vector iteration, so instead assume a pessimistic
2957
- // vscale of '1'.
2958
- Loop *ScalarLoop = LI->getLoopFor (LoopScalarBody);
2951
+ // For scalable vectorization we can't know at compile time how many
2952
+ // iterations of the loop are handled in one vector iteration, so instead
2953
+ // assume a pessimistic vscale of '1'.
2959
2954
Loop *VectorLoop = LI->getLoopFor (HeaderBB);
2960
- setProfileInfoAfterUnrolling (ScalarLoop , VectorLoop, ScalarLoop ,
2955
+ setProfileInfoAfterUnrolling (OrigLoop , VectorLoop, OrigLoop ,
2961
2956
VF.getKnownMinValue () * UF);
2962
2957
}
2963
2958
0 commit comments