llvm.org GIT mirror llvm / 8be2375
Merging r340416: ------------------------------------------------------------------------ r340416 | hakzsam | 2018-08-22 18:08:43 +0200 (Wed, 22 Aug 2018) | 8 lines AMDGPU: fix existing alias rules for constant and global Constant and global may alias, also one rules table wasn't ordered correctly. Pinpointed by Matt. v2: add a test with swapped parameters ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@341040 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 2 years ago
2 changed file(s) with 17 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
5353 static const AliasResult ASAliasRulesPrivIsZero[6][6] = {
5454 /* Private Global Constant Group Flat Region*/
5555 /* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, NoAlias},
56 /* Global */ {NoAlias , MayAlias, NoAlias , NoAlias , MayAlias, NoAlias},
57 /* Constant */ {NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, NoAlias},
56 /* Global */ {NoAlias , MayAlias, MayAlias, NoAlias , MayAlias, NoAlias},
57 /* Constant */ {NoAlias , MayAlias, MayAlias, NoAlias , MayAlias, NoAlias},
5858 /* Group */ {NoAlias , NoAlias , NoAlias , MayAlias, MayAlias, NoAlias},
5959 /* Flat */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
6060 /* Region */ {NoAlias , NoAlias , NoAlias , NoAlias , MayAlias, MayAlias}
6262 static const AliasResult ASAliasRulesGenIsZero[6][6] = {
6363 /* Flat Global Region Group Constant Private */
6464 /* Flat */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
65 /* Global */ {MayAlias, MayAlias, NoAlias , NoAlias , NoAlias , NoAlias},
66 /* Constant */ {MayAlias, NoAlias , MayAlias, NoAlias , NoAlias, NoAlias},
65 /* Global */ {MayAlias, MayAlias, NoAlias , NoAlias , MayAlias, NoAlias},
66 /* Region */ {MayAlias, NoAlias , NoAlias , NoAlias, MayAlias, NoAlias},
6767 /* Group */ {MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , NoAlias},
68 /* Region */ {MayAlias, NoAlias , NoAlias , NoAlias, MayAlias, NoAlias},
68 /* Constant */ {MayAlias, MayAlias, MayAlias, NoAlias , NoAlias, NoAlias},
6969 /* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , NoAlias , MayAlias}
7070 };
7171 assert(AS.MAX_COMMON_ADDRESS <= 5);
66 ret void
77 }
88
9 ; CHECK: MayAlias: i8 addrspace(1)* %p1, i8 addrspace(4)* %p
10
11 define void @test_constant_vs_global(i8 addrspace(4)* %p, i8 addrspace(1)* %p1) {
12 ret void
13 }
14
15 ; CHECK: MayAlias: i8 addrspace(1)* %p, i8 addrspace(4)* %p1
16
17 define void @test_global_vs_constant(i8 addrspace(1)* %p, i8 addrspace(4)* %p1) {
18 ret void
19 }
20