diff options
| author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2018-07-10 00:46:07 +0000 | 
|---|---|---|
| committer | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2018-07-10 00:46:07 +0000 | 
| commit | 688e752207acc4308eae8a83b489366ec88793c9 (patch) | |
| tree | 7828e023c257b5d6fd5a0b6a31935ec187e47638 /llvm/test/CodeGen/AMDGPU | |
| parent | 638426fc36e08ccee78605a4d8136757ca0faf12 (diff) | |
| download | bcm5719-llvm-688e752207acc4308eae8a83b489366ec88793c9.tar.gz bcm5719-llvm-688e752207acc4308eae8a83b489366ec88793c9.zip  | |
Revert "AMDGPU: Force inlining if LDS global address is used"
This reverts commit r336587, it was causing test failures on the
sanitizer bots.
llvm-svn: 336623
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/early-inline.ll | 10 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll | 77 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/stress-calls.ll | 2 | 
3 files changed, 2 insertions, 87 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/early-inline.ll b/llvm/test/CodeGen/AMDGPU/early-inline.ll index eb533048e8d..a4f970ee238 100644 --- a/llvm/test/CodeGen/AMDGPU/early-inline.ll +++ b/llvm/test/CodeGen/AMDGPU/early-inline.ll @@ -16,18 +16,10 @@ entry:  ; CHECK: mul i32  ; CHECK-NOT: call i32 +; CHECK: define i32 @c_alias  define amdgpu_kernel void @caller(i32 %x) {  entry:    %res = call i32 @callee(i32 %x)    store volatile i32 %res, i32 addrspace(1)* undef    ret void  } - -; CHECK-LABEL: @alias_caller( -; CHECK-NOT: call -define amdgpu_kernel void @alias_caller(i32 %x) { -entry: -  %res = call i32 @c_alias(i32 %x) -  store volatile i32 %res, i32 addrspace(1)* undef -  ret void -} diff --git a/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll b/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll deleted file mode 100644 index 63ee9e8059a..00000000000 --- a/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll +++ /dev/null @@ -1,77 +0,0 @@ -; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-function-calls -amdgpu-always-inline %s | FileCheck -check-prefixes=CALLS-ENABLED,ALL %s -; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-function-calls -amdgpu-stress-function-calls -amdgpu-always-inline %s | FileCheck -check-prefixes=STRESS-CALLS,ALL %s - -target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-p24:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-A5" - -@lds0 = addrspace(3) global i32 undef, align 4 -@lds1 = addrspace(3) global [512 x i32] undef, align 4 -@nested.lds.address = addrspace(1) global i32 addrspace(3)* @lds0, align 4 -@gds0 = addrspace(2) global i32 undef, align 4 - -@alias.lds0 = alias i32, i32 addrspace(3)* @lds0 -@lds.cycle = addrspace(3) global i32 ptrtoint (i32 addrspace(3)* @lds.cycle to i32), align 4 - - -; ALL-LABEL: define i32 @load_lds_simple() #0 { -define i32 @load_lds_simple() { -  %load = load i32, i32 addrspace(3)* @lds0, align 4 -  ret i32 %load -} - -; ALL-LABEL: define i32 @load_gds_simple() #0 { -define i32 @load_gds_simple() { -  %load = load i32, i32 addrspace(2)* @gds0, align 4 -  ret i32 %load -} - -; ALL-LABEL: define i32 @load_lds_const_gep() #0 { -define i32 @load_lds_const_gep() { -  %load = load i32, i32 addrspace(3)* getelementptr inbounds ([512 x i32], [512 x i32] addrspace(3)* @lds1, i64 0, i64 4), align 4 -  ret i32 %load -} - -; ALL-LABEL: define i32 @load_lds_var_gep(i32 %idx) #0 { -define i32 @load_lds_var_gep(i32 %idx) { -  %gep = getelementptr inbounds [512 x i32], [512 x i32] addrspace(3)* @lds1, i32 0, i32 %idx -  %load = load i32, i32 addrspace(3)* %gep, align 4 -  ret i32 %load -} - -; ALL-LABEL: define i32 addrspace(3)* @load_nested_address(i32 %idx) #0 { -define i32 addrspace(3)* @load_nested_address(i32 %idx) { -  %load = load i32 addrspace(3)*, i32 addrspace(3)* addrspace(1)* @nested.lds.address, align 4 -  ret i32 addrspace(3)* %load -} - -; ALL-LABEL: define i32 @load_lds_alias() #0 { -define i32 @load_lds_alias() { -  %load = load i32, i32 addrspace(3)* @alias.lds0, align 4 -  ret i32 %load -} - -; ALL-LABEL: define i32 @load_lds_cycle() #0 { -define i32 @load_lds_cycle() { -  %load = load i32, i32 addrspace(3)* @lds.cycle, align 4 -  ret i32 %load -} - -; ALL-LABEL: define i1 @icmp_lds_address() #0 { -define i1 @icmp_lds_address() { -  ret i1 icmp eq (i32 addrspace(3)* @lds0, i32 addrspace(3)* null) -} - -; ALL-LABEL: define i32 @transitive_call() #0 { -define i32 @transitive_call() { -  %call = call i32 @load_lds_simple() -  ret i32 %call -} - -; ALL-LABEL: define i32 @recursive_call_lds(i32 %arg0) #0 { -define i32 @recursive_call_lds(i32 %arg0) { -  %load = load i32, i32 addrspace(3)* @lds0, align 4 -  %add = add i32 %arg0, %load -  %call = call i32 @recursive_call_lds(i32 %add) -  ret i32 %call -} - -; ALL: attributes #0 = { alwaysinline } diff --git a/llvm/test/CodeGen/AMDGPU/stress-calls.ll b/llvm/test/CodeGen/AMDGPU/stress-calls.ll index 8498076bf29..480d40d67d4 100644 --- a/llvm/test/CodeGen/AMDGPU/stress-calls.ll +++ b/llvm/test/CodeGen/AMDGPU/stress-calls.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -amdgpu-always-inline %s | FileCheck %s +; RUN: opt -S -amdgpu-stress-function-calls -amdgpu-always-inline %s | FileCheck %s  ; CHECK: define internal fastcc i32 @alwaysinline_func(i32 %a) #0 {  define internal fastcc i32 @alwaysinline_func(i32 %a) alwaysinline {  | 

