[llvm] 6aa285e - [OpaquePtr][AArch64] Use load/store value type instead of pointer type for ldnt1/stnt1 alignment
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 16:56:54 PST 2022
Author: Arthur Eubanks
Date: 2022-02-24T16:56:13-08:00
New Revision: 6aa285eb85520e54021e5c38f0318d2118e4efcc
URL: https://github.com/llvm/llvm-project/commit/6aa285eb85520e54021e5c38f0318d2118e4efcc
DIFF: https://github.com/llvm/llvm-project/commit/6aa285eb85520e54021e5c38f0318d2118e4efcc.diff
LOG: [OpaquePtr][AArch64] Use load/store value type instead of pointer type for ldnt1/stnt1 alignment
Added:
Modified:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index cc0e8b37c184b..6848219ea7915 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -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;
}
More information about the llvm-commits
mailing list