[llvm] 162d903 - GlobalISel: Pass through AA metadata for target memory intrinsics
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 6 22:14:20 PST 2022
Author: Matt Arsenault
Date: 2022-11-06T22:14:12-08:00
New Revision: 162d9030abca31a12c14c4b1051da3143f6865ee
URL: https://github.com/llvm/llvm-project/commit/162d9030abca31a12c14c4b1051da3143f6865ee
DIFF: https://github.com/llvm/llvm-project/commit/162d9030abca31a12c14c4b1051da3143f6865ee.diff
LOG: GlobalISel: Pass through AA metadata for target memory intrinsics
The corresponding change for the DAG was done in fa4aac7335ac7ecabbb634d134bd4897783bf62b
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 69fb5bce632e8..7faae09220cc9 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -2481,7 +2481,8 @@ bool IRTranslator::translateCall(const User &U, MachineIRBuilder &MIRBuilder) {
? getLLTForMVT(Info.memVT.getSimpleVT())
: LLT::scalar(Info.memVT.getStoreSizeInBits());
MIB.addMemOperand(MF->getMachineMemOperand(MachinePointerInfo(Info.ptrVal),
- Info.flags, MemTy, Alignment));
+ Info.flags, MemTy, Alignment,
+ CI.getAAMetadata()));
}
return true;
diff --git a/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll b/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
index a68be9c78f728..9c6c8beed669b 100644
--- a/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
+++ b/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
@@ -1,4 +1,5 @@
; RUN: llc -global-isel=0 -march=amdgcn -mcpu=bonaire -stop-before=machine-scheduler < %s | FileCheck -enable-var-scope -check-prefixes=MIR %s
+; RUN: llc -global-isel=1 -march=amdgcn -mcpu=bonaire -stop-before=machine-scheduler < %s | FileCheck -enable-var-scope -check-prefixes=MIR %s
; Make sure !noalias metadata is passed through from target intrinsics
More information about the llvm-commits
mailing list