Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp =================================================================== --- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -11928,12 +11928,11 @@ case Intrinsic::aarch64_mops_memset_tag: { Value *Dst = I.getArgOperand(0); Value *Val = I.getArgOperand(1); - PointerType *PtrTy = cast(Dst->getType()); Info.opc = ISD::INTRINSIC_W_CHAIN; Info.memVT = MVT::getVT(Val->getType()); Info.ptrVal = Dst; Info.offset = 0; - Info.align = DL.getABITypeAlign(PtrTy->getPointerElementType()); + Info.align = I.getParamAlign(0).valueOrOne(); Info.flags = MachineMemOperand::MOStore; // The size of the memory being operated on is unknown at this point Info.size = MemoryLocation::UnknownSize;