[PATCH] D84301: [AMDGPU] Fix AMDGPUPerfHint::isIndirectAccess test case
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 03:01:21 PDT 2020
foad created this revision.
foad added a reviewer: rampitec.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.
As suggested in D83862 <https://reviews.llvm.org/D83862>, ignore loads from the constant address space,
otherwise all uses of kernel arguments will be treated as indirect
accesses.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84301
Files:
llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
llvm/test/CodeGen/AMDGPU/perfhint.ll
Index: llvm/test/CodeGen/AMDGPU/perfhint.ll
===================================================================
--- llvm/test/CodeGen/AMDGPU/perfhint.ll
+++ llvm/test/CodeGen/AMDGPU/perfhint.ll
@@ -86,8 +86,8 @@
}
; GCN-LABEL: {{^}}test_indirect_through_phi:
-; MemoryBound: 0
-; WaveLimiterHint : 0
+; GCN: MemoryBound: 0
+; GCN: WaveLimiterHint : 0
define amdgpu_kernel void @test_indirect_through_phi(float addrspace(1)* %arg) {
bb:
%load = load float, float addrspace(1)* %arg, align 8
Index: llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
@@ -160,7 +160,7 @@
if (auto LD = dyn_cast<LoadInst>(V)) {
auto M = LD->getPointerOperand();
- if (isGlobalAddr(M) || isLocalAddr(M) || isConstantAddr(M)) {
+ if (isGlobalAddr(M) || isLocalAddr(M)) {
LLVM_DEBUG(dbgs() << " is IA\n");
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84301.279744.patch
Type: text/x-patch
Size: 1033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200722/fcd1003f/attachment.bin>
More information about the llvm-commits
mailing list