@@ -586,15 +586,13 @@ Value *AArch64LoopIdiomTransform::expandFindMismatch(
586
586
Type *SVELoadType = ScalableVectorType::get (Builder.getInt8Ty (), 16 );
587
587
Value *Passthru = ConstantInt::getNullValue (SVELoadType);
588
588
589
- Value *SVELhsGep = Builder.CreateGEP (LoadType, PtrA, SVEIndexPhi);
590
- if (GEPA->isInBounds ())
591
- cast<GetElementPtrInst>(SVELhsGep)->setIsInBounds (true );
589
+ Value *SVELhsGep =
590
+ Builder.CreateGEP (LoadType, PtrA, SVEIndexPhi, " " , GEPA->isInBounds ());
592
591
Value *SVELhsLoad = Builder.CreateMaskedLoad (SVELoadType, SVELhsGep, Align (1 ),
593
592
LoopPred, Passthru);
594
593
595
- Value *SVERhsGep = Builder.CreateGEP (LoadType, PtrB, SVEIndexPhi);
596
- if (GEPB->isInBounds ())
597
- cast<GetElementPtrInst>(SVERhsGep)->setIsInBounds (true );
594
+ Value *SVERhsGep =
595
+ Builder.CreateGEP (LoadType, PtrB, SVEIndexPhi, " " , GEPB->isInBounds ());
598
596
Value *SVERhsLoad = Builder.CreateMaskedLoad (SVELoadType, SVERhsGep, Align (1 ),
599
597
LoopPred, Passthru);
600
598
@@ -670,14 +668,12 @@ Value *AArch64LoopIdiomTransform::expandFindMismatch(
670
668
// Load bytes from each array and compare them.
671
669
Value *GepOffset = Builder.CreateZExt (IndexPhi, I64Type);
672
670
673
- Value *LhsGep = Builder.CreateGEP (LoadType, PtrA, GepOffset);
674
- if (GEPA->isInBounds ())
675
- cast<GetElementPtrInst>(LhsGep)->setIsInBounds (true );
671
+ Value *LhsGep =
672
+ Builder.CreateGEP (LoadType, PtrA, GepOffset, " " , GEPA->isInBounds ());
676
673
Value *LhsLoad = Builder.CreateLoad (LoadType, LhsGep);
677
674
678
- Value *RhsGep = Builder.CreateGEP (LoadType, PtrB, GepOffset);
679
- if (GEPB->isInBounds ())
680
- cast<GetElementPtrInst>(RhsGep)->setIsInBounds (true );
675
+ Value *RhsGep =
676
+ Builder.CreateGEP (LoadType, PtrB, GepOffset, " " , GEPB->isInBounds ());
681
677
Value *RhsLoad = Builder.CreateLoad (LoadType, RhsGep);
682
678
683
679
Value *MatchCmp = Builder.CreateICmpEQ (LhsLoad, RhsLoad);
0 commit comments