summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-18 16:10:11 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-18 16:10:11 +0000
commit9430b9113a54eafaa9bd7d7bb288c7a457d26404 (patch)
treeb85183ac74471854640148e82a8ffc6126523a40 /llvm/test
parent233a364bd8c4bd244b675ff2b9dd3381d0e84e4e (diff)
downloadbcm5719-llvm-9430b9113a54eafaa9bd7d7bb288c7a457d26404.tar.gz
bcm5719-llvm-9430b9113a54eafaa9bd7d7bb288c7a457d26404.zip
AMDGPU: Fix assert when erroring on a call
For some reason an assert is now hit when a valid chain is not returned, so return the entry chain. llvm-svn: 269948
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AMDGPU/call.ll18
1 files changed, 15 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/call.ll b/llvm/test/CodeGen/AMDGPU/call.ll
index 168952ca0f1..a3e986d367e 100644
--- a/llvm/test/CodeGen/AMDGPU/call.ll
+++ b/llvm/test/CodeGen/AMDGPU/call.ll
@@ -1,8 +1,10 @@
-; RUN: not llc -march=amdgcn -mcpu=SI -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s
-; RUN: not llc -march=amdgcn -mcpu=tonga -verify-machineinstrs -exit-on-error < %s 2>&1 | FileCheck %s
-; RUN: not llc -march=r600 -mcpu=cypress -exit-on-error < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=amdgcn -verify-machineinstrs < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s 2>&1 | FileCheck %s
+; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s
; CHECK: in function test_call_external{{.*}}: unsupported call to function external_function
+; CHECK: in function test_call{{.*}}: unsupported call to function defined_function
+; CHECK: in function test_tail_call{{.*}}: unsupported call to function defined_function
declare i32 @external_function(i32) nounwind
@@ -31,3 +33,13 @@ define void @test_call(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
store i32 %result, i32 addrspace(1)* %out
ret void
}
+
+define void @test_tail_call(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
+ %b_ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1
+ %a = load i32, i32 addrspace(1)* %in
+ %b = load i32, i32 addrspace(1)* %b_ptr
+ %c = tail call i32 @defined_function(i32 %b) nounwind
+ %result = add i32 %a, %c
+ store i32 %result, i32 addrspace(1)* %out
+ ret void
+}
OpenPOWER on IntegriCloud