forked from OSchip/llvm-project
[OpaquePtr][AArch64] Use load/store value type instead of pointer type for ldnt1/stnt1 alignment
This commit is contained in:
parent
565add5a62
commit
6aa285eb85
|
@ -11955,22 +11955,23 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.flags = MachineMemOperand::MOStore | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
case Intrinsic::aarch64_sve_ldnt1: {
|
||||
PointerType *PtrTy = cast<PointerType>(I.getArgOperand(1)->getType());
|
||||
Type *ElTy = cast<VectorType>(I.getType())->getElementType();
|
||||
Info.opc = ISD::INTRINSIC_W_CHAIN;
|
||||
Info.memVT = MVT::getVT(I.getType());
|
||||
Info.ptrVal = I.getArgOperand(1);
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlign(PtrTy->getPointerElementType());
|
||||
Info.align = DL.getABITypeAlign(ElTy);
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MONonTemporal;
|
||||
return true;
|
||||
}
|
||||
case Intrinsic::aarch64_sve_stnt1: {
|
||||
PointerType *PtrTy = cast<PointerType>(I.getArgOperand(2)->getType());
|
||||
Type *ElTy =
|
||||
cast<VectorType>(I.getArgOperand(0)->getType())->getElementType();
|
||||
Info.opc = ISD::INTRINSIC_W_CHAIN;
|
||||
Info.memVT = MVT::getVT(I.getOperand(0)->getType());
|
||||
Info.ptrVal = I.getArgOperand(2);
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlign(PtrTy->getPointerElementType());
|
||||
Info.align = DL.getABITypeAlign(ElTy);
|
||||
Info.flags = MachineMemOperand::MOStore | MachineMemOperand::MONonTemporal;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue