diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2018-08-22 16:08:48 +0000 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2018-08-22 16:08:48 +0000 |
commit | 7bd9dcffcdf33b190151cd5979e9578822cf78ab (patch) | |
tree | 997485ce8aff3b287f35e76988aadb6aae44a077 /llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll | |
parent | d81d6f7d5898120462b433fa121348e3be525f85 (diff) | |
download | bcm5719-llvm-7bd9dcffcdf33b190151cd5979e9578822cf78ab.tar.gz bcm5719-llvm-7bd9dcffcdf33b190151cd5979e9578822cf78ab.zip |
AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space
32-bit constant address space is declared as 6, so the
maximum number of address spaces is 6, not 5.
Fixes "LLVM ERROR: Pointer address space out of range".
v5: rename MAX_COMMON_ADDRESS to MAX_AMDGPU_ADDRESS
v4: - fix compilation issues
- fix out of bounds access
v3: use static_assert()
v2: add a very simple test for 32-bit addr space
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630
llvm-svn: 340417
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll b/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll index a84ef77cea3..35614634e76 100644 --- a/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll +++ b/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll @@ -19,3 +19,15 @@ define void @test_global_vs_constant(i8 addrspace(1)* %p, i8 addrspace(4)* %p1) ret void } +; CHECK: MayAlias: i8 addrspace(1)* %p1, i8 addrspace(6)* %p + +define void @test_constant_32bit_vs_global(i8 addrspace(6)* %p, i8 addrspace(1)* %p1) { + ret void +} + +; CHECK: MayAlias: i8 addrspace(4)* %p1, i8 addrspace(6)* %p + +define void @test_constant_32bit_vs_constant(i8 addrspace(6)* %p, i8 addrspace(4)* %p1) { + ret void +} + |