Skip to content

Commit f507db4

Browse files
committed
fixup! [RISCV][LoopIdiomVectorize] Support VP intrinsics in LoopIdiomVectorize
1 parent 21b0f34 commit f507db4

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
@@ -382,11 +382,6 @@ Value *LoopIdiomVectorize::createMaskedFindMismatch(
382382
Value *PtrA = GEPA->getPointerOperand();
383383
Value *PtrB = GEPB->getPointerOperand();
384384

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

@@ -494,11 +489,6 @@ Value *LoopIdiomVectorize::createPredicatedFindMismatch(
494489
Value *PtrA = GEPA->getPointerOperand();
495490
Value *PtrB = GEPB->getPointerOperand();
496491

497-
// At this point we know two things must be true:
498-
// 1. Start <= End
499-
// 2. ExtMaxLen <= 4096 due to the page checks.
500-
// Therefore, we know that we can use a 64-bit induction variable that
501-
// starts from 0 -> ExtMaxLen and it will not overflow.
502492
auto *JumpToVectorLoop = BranchInst::Create(VectorLoopStartBlock);
503493
Builder.Insert(JumpToVectorLoop);
504494

@@ -758,6 +748,11 @@ Value *LoopIdiomVectorize::expandFindMismatch(
758748
// processed in each iteration, etc.
759749
Builder.SetInsertPoint(VectorLoopPreheaderBlock);
760750

751+
// At this point we know two things must be true:
752+
// 1. Start <= End
753+
// 2. ExtMaxLen <= MinPageSize due to the page checks.
754+
// Therefore, we know that we can use a 64-bit induction variable that
755+
// starts from 0 -> ExtMaxLen and it will not overflow.
761756
Value *VectorLoopRes = nullptr;
762757
switch (VectorizeStyle) {
763758
case LoopIdiomVectorizeStyle::Masked:

0 commit comments

Comments
 (0)