[PATCH] D64114: AMDGPU: Add missing code for GDS
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 09:44:18 PDT 2019
nhaehnle updated this revision to Diff 210122.
nhaehnle added a comment.
Add test case and remove the legalizer part.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64114/new/
https://reviews.llvm.org/D64114
Files:
lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
Index: test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
===================================================================
--- test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
+++ test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
@@ -51,6 +51,41 @@
ret void
}
+; CHECK: NoAlias: i8 addrspace(2)* %p, i8* %p1
+define void @test_region_vs_flat(i8 addrspace(2)* %p, i8 addrspace(0)* %p1) {
+ ret void
+}
+
+; CHECK: NoAlias: i8 addrspace(1)* %p1, i8 addrspace(2)* %p
+define void @test_region_vs_global(i8 addrspace(2)* %p, i8 addrspace(1)* %p1) {
+ ret void
+}
+
+; CHECK: MayAlias: i8 addrspace(2)* %p, i8 addrspace(2)* %p1
+define void @test_region(i8 addrspace(2)* %p, i8 addrspace(2)* %p1) {
+ ret void
+}
+
+; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(3)* %p1
+define void @test_region_vs_group(i8 addrspace(2)* %p, i8 addrspace(3)* %p1) {
+ ret void
+}
+
+; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(4)* %p1
+define void @test_region_vs_constant(i8 addrspace(2)* %p, i8 addrspace(4)* %p1) {
+ ret void
+}
+
+; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(5)* %p1
+define void @test_region_vs_private(i8 addrspace(2)* %p, i8 addrspace(5)* %p1) {
+ ret void
+}
+
+; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(6)* %p1
+define void @test_region_vs_const32(i8 addrspace(2)* %p, i8 addrspace(6)* %p1) {
+ ret void
+}
+
; CHECK: MayAlias: i8 addrspace(7)* %p, i8* %p1
define void @test_7_0(i8 addrspace(7)* %p, i8 addrspace(0)* %p1) {
ret void
Index: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
+++ lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
@@ -56,13 +56,13 @@
// These arrays are indexed by address space value enum elements 0 ... to 7
static const AliasResult ASAliasRules[8][8] = {
/* Flat Global Region Group Constant Private Constant 32-bit Buffer Fat Ptr */
- /* Flat */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
+ /* Flat */ {MayAlias, MayAlias, NoAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
/* Global */ {MayAlias, MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, MayAlias},
- /* Region */ {MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, NoAlias},
+ /* Region */ {NoAlias, NoAlias , MayAlias, NoAlias , NoAlias, NoAlias , NoAlias, NoAlias},
/* Group */ {MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , NoAlias , NoAlias , NoAlias},
- /* Constant */ {MayAlias, MayAlias, MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, MayAlias},
+ /* Constant */ {MayAlias, MayAlias, NoAlias, NoAlias , NoAlias , NoAlias , MayAlias, MayAlias},
/* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , NoAlias , MayAlias, NoAlias , NoAlias},
- /* Constant 32-bit */ {MayAlias, MayAlias, MayAlias, NoAlias , MayAlias, NoAlias , NoAlias , MayAlias},
+ /* Constant 32-bit */ {MayAlias, MayAlias, NoAlias, NoAlias , MayAlias, NoAlias , NoAlias , MayAlias},
/* Buffer Fat Ptr */ {MayAlias, MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, MayAlias}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64114.210122.patch
Type: text/x-patch
Size: 3343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/f9d0c4fd/attachment.bin>
More information about the llvm-commits
mailing list