@@ -45,8 +45,7 @@ void llvm::createMemCpyLoopKnownSize(
4545
4646 Type *TypeOfCopyLen = CopyLen->getType ();
4747 Type *LoopOpType = TTI.getMemcpyLoopLoweringType (
48- Ctx, CopyLen, SrcAS, DstAS, SrcAlign.value (), DstAlign.value (),
49- AtomicElementSize);
48+ Ctx, CopyLen, SrcAS, DstAS, SrcAlign, DstAlign, AtomicElementSize);
5049 assert ((!AtomicElementSize || !LoopOpType->isVectorTy ()) &&
5150 " Atomic memcpy lowering is not supported for vector operand type" );
5251
@@ -111,8 +110,8 @@ void llvm::createMemCpyLoopKnownSize(
111110
112111 SmallVector<Type *, 5 > RemainingOps;
113112 TTI.getMemcpyLoopResidualLoweringType (RemainingOps, Ctx, RemainingBytes,
114- SrcAS, DstAS, SrcAlign. value () ,
115- DstAlign. value (), AtomicElementSize);
113+ SrcAS, DstAS, SrcAlign, DstAlign ,
114+ AtomicElementSize);
116115
117116 for (auto *OpTy : RemainingOps) {
118117 Align PartSrcAlign (commonAlignment (SrcAlign, BytesCopied));
@@ -197,8 +196,7 @@ void llvm::createMemCpyLoopUnknownSize(
197196 unsigned DstAS = cast<PointerType>(DstAddr->getType ())->getAddressSpace ();
198197
199198 Type *LoopOpType = TTI.getMemcpyLoopLoweringType (
200- Ctx, CopyLen, SrcAS, DstAS, SrcAlign.value (), DstAlign.value (),
201- AtomicElementSize);
199+ Ctx, CopyLen, SrcAS, DstAS, SrcAlign, DstAlign, AtomicElementSize);
202200 assert ((!AtomicElementSize || !LoopOpType->isVectorTy ()) &&
203201 " Atomic memcpy lowering is not supported for vector operand type" );
204202 unsigned LoopOpSize = DL.getTypeStoreSize (LoopOpType);
@@ -411,8 +409,8 @@ static void createMemMoveLoopUnknownSize(Instruction *InsertBefore,
411409 unsigned SrcAS = cast<PointerType>(SrcAddr->getType ())->getAddressSpace ();
412410 unsigned DstAS = cast<PointerType>(DstAddr->getType ())->getAddressSpace ();
413411
414- Type *LoopOpType = TTI.getMemcpyLoopLoweringType (
415- Ctx, CopyLen, SrcAS, DstAS, SrcAlign. value () , DstAlign. value () );
412+ Type *LoopOpType = TTI.getMemcpyLoopLoweringType (Ctx, CopyLen, SrcAS, DstAS,
413+ SrcAlign, DstAlign);
416414 unsigned LoopOpSize = DL.getTypeStoreSize (LoopOpType);
417415 Type *Int8Type = Type::getInt8Ty (Ctx);
418416 bool LoopOpIsInt8 = LoopOpType == Int8Type;
@@ -668,8 +666,8 @@ static void createMemMoveLoopKnownSize(Instruction *InsertBefore,
668666 unsigned SrcAS = cast<PointerType>(SrcAddr->getType ())->getAddressSpace ();
669667 unsigned DstAS = cast<PointerType>(DstAddr->getType ())->getAddressSpace ();
670668
671- Type *LoopOpType = TTI.getMemcpyLoopLoweringType (
672- Ctx, CopyLen, SrcAS, DstAS, SrcAlign. value () , DstAlign. value () );
669+ Type *LoopOpType = TTI.getMemcpyLoopLoweringType (Ctx, CopyLen, SrcAS, DstAS,
670+ SrcAlign, DstAlign);
673671 unsigned LoopOpSize = DL.getTypeStoreSize (LoopOpType);
674672
675673 // Calculate the loop trip count and remaining bytes to copy after the loop.
@@ -737,8 +735,8 @@ static void createMemMoveLoopKnownSize(Instruction *InsertBefore,
737735 IRBuilder<> BwdResBuilder (CopyBackwardsBB->getFirstNonPHI ());
738736 SmallVector<Type *, 5 > RemainingOps;
739737 TTI.getMemcpyLoopResidualLoweringType (RemainingOps, Ctx, RemainingBytes,
740- SrcAS, DstAS, PartSrcAlign. value () ,
741- PartDstAlign. value () );
738+ SrcAS, DstAS, PartSrcAlign,
739+ PartDstAlign);
742740 for (auto *OpTy : RemainingOps) {
743741 // reverse the order of the emitted operations
744742 BwdResBuilder.SetInsertPoint (CopyBackwardsBB->getFirstNonPHI ());
@@ -818,8 +816,8 @@ static void createMemMoveLoopKnownSize(Instruction *InsertBefore,
818816 IRBuilder<> FwdResBuilder (FwdResidualBB->getTerminator ());
819817 SmallVector<Type *, 5 > RemainingOps;
820818 TTI.getMemcpyLoopResidualLoweringType (RemainingOps, Ctx, RemainingBytes,
821- SrcAS, DstAS, PartSrcAlign. value () ,
822- PartDstAlign. value () );
819+ SrcAS, DstAS, PartSrcAlign,
820+ PartDstAlign);
823821 for (auto *OpTy : RemainingOps)
824822 GenerateResidualLdStPair (OpTy, FwdResBuilder, BytesCopied);
825823 }
0 commit comments