Skip to content

Commit d90f0d8

Browse files
committed
fixup! [RISCV][LoopIdiomVectorize] Support VP intrinsics in LoopIdiomVectorize
1 parent 47050e6 commit d90f0d8

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,6 @@ Value *LoopIdiomVectorize::createMaskedFindMismatch(IRBuilder<> &Builder,
384384
Value *PtrA = GEPA->getPointerOperand();
385385
Value *PtrB = GEPB->getPointerOperand();
386386

387-
// At this point we know two things must be true:
388-
// 1. Start <= End
389-
// 2. ExtMaxLen <= MinPageSize due to the page checks.
390-
// Therefore, we know that we can use a 64-bit induction variable that
391-
// starts from 0 -> ExtMaxLen and it will not overflow.
392387
ScalableVectorType *PredVTy =
393388
ScalableVectorType::get(Builder.getInt1Ty(), ByteCompareVF);
394389

@@ -487,11 +482,6 @@ Value *LoopIdiomVectorize::createPredicatedFindMismatch(IRBuilder<> &Builder,
487482
Value *PtrA = GEPA->getPointerOperand();
488483
Value *PtrB = GEPB->getPointerOperand();
489484

490-
// At this point we know two things must be true:
491-
// 1. Start <= End
492-
// 2. ExtMaxLen <= 4096 due to the page checks.
493-
// Therefore, we know that we can use a 64-bit induction variable that
494-
// starts from 0 -> ExtMaxLen and it will not overflow.
495485
auto *JumpToVectorLoop = BranchInst::Create(VectorLoopStartBlock);
496486
Builder.Insert(JumpToVectorLoop);
497487

@@ -740,6 +730,11 @@ Value *LoopIdiomVectorize::expandFindMismatch(
740730
// processed in each iteration, etc.
741731
Builder.SetInsertPoint(VectorLoopPreheaderBlock);
742732

733+
// At this point we know two things must be true:
734+
// 1. Start <= End
735+
// 2. ExtMaxLen <= MinPageSize due to the page checks.
736+
// Therefore, we know that we can use a 64-bit induction variable that
737+
// starts from 0 -> ExtMaxLen and it will not overflow.
743738
Value *VectorLoopRes = nullptr;
744739
switch (VectorizeStyle) {
745740
case LoopIdiomVectorizeStyle::Masked:

0 commit comments

Comments
 (0)