[llvm] 8228b84 - [NFC] Use new version of SelectionDAG::getLoad in NVPTXLowerFormalArguments
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 00:39:02 PST 2023
Author: Guillaume Chatelet
Date: 2023-01-24T08:38:49Z
New Revision: 8228b84da7767a72caad5b3aff00f672c4f49d3d
URL: https://github.com/llvm/llvm-project/commit/8228b84da7767a72caad5b3aff00f672c4f49d3d
DIFF: https://github.com/llvm/llvm-project/commit/8228b84da7767a72caad5b3aff00f672c4f49d3d.diff
LOG: [NFC] Use new version of SelectionDAG::getLoad in NVPTXLowerFormalArguments
Let's use the new version of the API that helps tighten the alignment
values Semantic.
Differential Revision: https://reviews.llvm.org/D141830
Added:
Modified:
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
index 62066706df0d2..008a04aa2f638 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
@@ -2745,11 +2745,11 @@ SDValue NVPTXTargetLowering::LowerFormalArguments(
DAG.getConstant(Offsets[VecIdx], dl, PtrVT));
Value *srcValue = Constant::getNullValue(PointerType::get(
EltVT.getTypeForEVT(F->getContext()), ADDRESS_SPACE_PARAM));
- SDValue P =
- DAG.getLoad(VecVT, dl, Root, VecAddr,
- MachinePointerInfo(srcValue), aggregateIsPacked,
- MachineMemOperand::MODereferenceable |
- MachineMemOperand::MOInvariant);
+ SDValue P = DAG.getLoad(VecVT, dl, Root, VecAddr,
+ MachinePointerInfo(srcValue),
+ MaybeAlign(aggregateIsPacked ? 1 : 0),
+ MachineMemOperand::MODereferenceable |
+ MachineMemOperand::MOInvariant);
if (P.getNode())
P.getNode()->setIROrder(idx + 1);
for (unsigned j = 0; j < NumElts; ++j) {
More information about the llvm-commits
mailing list