[llvm] r340202 - Revert "AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space"
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 12:31:03 PDT 2018
Author: vitalybuka
Date: Mon Aug 20 12:31:03 2018
New Revision: 340202
URL: http://llvm.org/viewvc/llvm-project?rev=340202&view=rev
Log:
Revert "AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space"
As it introduces out of bound access.
This reverts commit r340172 and r340171
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPU.h
llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPU.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPU.h?rev=340202&r1=340201&r2=340202&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPU.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPU.h Mon Aug 20 12:31:03 2018
@@ -229,7 +229,7 @@ struct AMDGPUAS {
enum : unsigned {
// The maximum value for flat, generic, local, private, constant and region.
- MAX_COMMON_ADDRESS = 6,
+ MAX_COMMON_ADDRESS = 5,
GLOBAL_ADDRESS = 1, ///< Address space for global memory (RAT0, VTX0).
CONSTANT_ADDRESS = 4, ///< Address space for constant memory (VTX2)
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp?rev=340202&r1=340201&r2=340202&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp Mon Aug 20 12:31:03 2018
@@ -69,7 +69,7 @@ AMDGPUAAResult::ASAliasRulesTy::ASAliasR
/* Region */ {MayAlias, NoAlias , NoAlias , NoAlias, MayAlias, NoAlias},
/* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , NoAlias , MayAlias}
};
- static_assert(AMDGPUAS::MAX_COMMON_ADDRESS <= 6, "Addr space out of range");
+ assert(AS.MAX_COMMON_ADDRESS <= 5);
if (AS.FLAT_ADDRESS == 0) {
assert(AS.GLOBAL_ADDRESS == 1 &&
AS.REGION_ADDRESS == 2 &&
Modified: llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll?rev=340202&r1=340201&r2=340202&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll Mon Aug 20 12:31:03 2018
@@ -7,9 +7,3 @@ define void @test(i8 addrspace(5)* %p, i
ret void
}
-; CHECK: NoAlias: i8 addrspace(1)* %p1, i8 addrspace(6)* %p
-
-define void @test_32bit_addr_space(i8 addrspace(6)* %p, i8 addrspace(1)* %p1) {
- ret void
-}
-
More information about the llvm-commits
mailing list