From 99c780159d5253f271e1e04facdb5bc07f4fc90c Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 11 Sep 2018 04:00:41 +0000 Subject: [PATCH] AMDGPU: Don't error on out of bounds address spaces We should never abort on valid IR. The most reasonable interpretation of an arbitrary address space pointer is probably some kind of special subset of global memory. llvm-svn: 341894 --- llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll b/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll index 3561463..08e7883 100644 --- a/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll +++ b/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll @@ -31,3 +31,22 @@ define void @test_constant_32bit_vs_constant(i8 addrspace(6)* %p, i8 addrspace(4 ret void } +; CHECK: MayAlias: i8 addrspace(999)* %p0, i8* %p +define void @test_0_999(i8 addrspace(0)* %p, i8 addrspace(999)* %p0) { + ret void +} + +; CHECK: MayAlias: i8 addrspace(999)* %p, i8* %p1 +define void @test_999_0(i8 addrspace(999)* %p, i8 addrspace(0)* %p1) { + ret void +} + +; CHECK: MayAlias: i8 addrspace(1)* %p, i8 addrspace(999)* %p1 +define void @test_1_999(i8 addrspace(1)* %p, i8 addrspace(999)* %p1) { + ret void +} + +; CHECK: MayAlias: i8 addrspace(1)* %p1, i8 addrspace(999)* %p +define void @test_999_1(i8 addrspace(999)* %p, i8 addrspace(1)* %p1) { + ret void +} -- 2.7.4