summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2016-01-27 17:30:33 +0000
committerOliver Stannard <oliver.stannard@arm.com>2016-01-27 17:30:33 +0000
commit1e67a9f1966edbe4b24aaa2ecce7270d00127dd4 (patch)
treed9f6bcacaf753b61099eb65149f0efd78f0237e7 /llvm/test
parent5e03a4b8370d1103489b3d711a00f2d504628570 (diff)
downloadbcm5719-llvm-1e67a9f1966edbe4b24aaa2ecce7270d00127dd4.tar.gz
bcm5719-llvm-1e67a9f1966edbe4b24aaa2ecce7270d00127dd4.zip
Refactor backend diagnostics for unsupported features
The BPF and WebAssembly backends had identical code for emitting errors for unsupported features, and AMDGPU had very similar code. This merges them all into one DiagnosticInfo subclass, that can be used by any backend. There should be minimal functional changes here, but some AMDGPU tests have been updated for the new format of errors (it used a slightly different format to BPF and WebAssembly). The AMDGPU error messages will now benefit from having precise source locations when debug info is available. The implementation of DiagnosticInfoUnsupported::print must be in lib/Codegen rather than in the existing file in lib/IR/ to avoid introducing a dependency from IR to CodeGen. Differential Revision: http://reviews.llvm.org/D16590 llvm-svn: 258951
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AMDGPU/addrspacecast.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/call.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/lds-initializer.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll2
-rw-r--r--llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll2
9 files changed, 9 insertions, 9 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/addrspacecast.ll b/llvm/test/CodeGen/AMDGPU/addrspacecast.ll
index 61bcd4b3c09..e029d917dba 100644
--- a/llvm/test/CodeGen/AMDGPU/addrspacecast.ll
+++ b/llvm/test/CodeGen/AMDGPU/addrspacecast.ll
@@ -1,6 +1,6 @@
; RUN: not llc -O0 -march=amdgcn -mcpu=bonaire -mattr=-promote-alloca < %s 2>&1 | FileCheck -check-prefix=ERROR %s
-; ERROR: unsupported addrspacecast not implemented
+; ERROR: addrspacecast not implemented
; XUN: llc -O0 -march=amdgcn -mcpu=bonaire -mattr=-promote-alloca < %s | FileCheck -check-prefix=CHECK -check-prefix=CHECK-NO-PROMOTE %s
; XUN: llc -O0 -march=amdgcn -mcpu=bonaire -mattr=+promote-alloca < %s | FileCheck -check-prefix=CHECK -check-prefix=CHECK-PROMOTE %s
diff --git a/llvm/test/CodeGen/AMDGPU/call.ll b/llvm/test/CodeGen/AMDGPU/call.ll
index e769fd11c28..82e77350ab2 100644
--- a/llvm/test/CodeGen/AMDGPU/call.ll
+++ b/llvm/test/CodeGen/AMDGPU/call.ll
@@ -2,7 +2,7 @@
; 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: error: unsupported call to function external_function in test_call_external
+; CHECK: in function test_call_external{{.*}}: unsupported call to function external_function
declare i32 @external_function(i32) nounwind
diff --git a/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll b/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
index f4409a0984a..580dc00f935 100644
--- a/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
+++ b/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
@@ -2,7 +2,7 @@
; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s
; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s
-; CHECK: error: unsupported dynamic alloca in test_dynamic_stackalloc
+; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca
define void @test_dynamic_stackalloc(i32 addrspace(1)* %out, i32 %n) {
%alloca = alloca i32, i32 %n
diff --git a/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll b/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll
index 45aa8bf4e1d..522a4b29775 100644
--- a/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll
+++ b/llvm/test/CodeGen/AMDGPU/global-zero-initializer.ll
@@ -1,7 +1,7 @@
; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s
; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s
-; CHECK: error: unsupported initializer for address space in load_init_global_global
+; CHECK: in function load_init_global_global{{.*}}: unsupported initializer for address space
@lds = addrspace(1) global [256 x i32] zeroinitializer
diff --git a/llvm/test/CodeGen/AMDGPU/lds-initializer.ll b/llvm/test/CodeGen/AMDGPU/lds-initializer.ll
index bf8df63be9f..9875814b03d 100644
--- a/llvm/test/CodeGen/AMDGPU/lds-initializer.ll
+++ b/llvm/test/CodeGen/AMDGPU/lds-initializer.ll
@@ -1,7 +1,7 @@
; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s
; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s
-; CHECK: error: unsupported initializer for address space in load_init_lds_global
+; CHECK: in function load_init_lds_global{{.*}}: unsupported initializer for address space
@lds = addrspace(3) global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
diff --git a/llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll b/llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll
index fb51bc0e50c..cb5d73fb0d8 100644
--- a/llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll
+++ b/llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll
@@ -1,7 +1,7 @@
; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s
; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s
-; CHECK: error: unsupported initializer for address space in load_zeroinit_lds_global
+; CHECK: in function load_zeroinit_lds_global{{.*}}: unsupported initializer for address space
@lds = addrspace(3) global [256 x i32] zeroinitializer
diff --git a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll
index d96ea743f6e..2e8625256f1 100644
--- a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll
+++ b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll
@@ -1,7 +1,7 @@
; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
; RUN: not llc -mtriple=amdgcn-unknown-unknown -mcpu=kaveri -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=ERROR %s
-; ERROR: error: unsupported hsa intrinsic without hsa target in test
+; ERROR: in function test{{.*}}: unsupported hsa intrinsic without hsa target
; GCN-LABEL: {{^}}test:
; GCN: enable_sgpr_dispatch_ptr = 1
diff --git a/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll b/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
index 73a146710a9..29ef858b85b 100644
--- a/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
+++ b/llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
@@ -1,6 +1,6 @@
; RUN: not llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa < %s 2>&1 | FileCheck %s
-; CHECK: error: unsupported non-compute shaders with HSA in pixel_shader
+; CHECK: in function pixel_s{{.*}}: unsupported non-compute shaders with HSA
define void @pixel_shader() #0 {
ret void
}
diff --git a/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll b/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
index 10739df0837..609001733b7 100644
--- a/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
+++ b/llvm/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
@@ -6,7 +6,7 @@
declare void @foo(float*) #0
declare void @foo.varargs(...) #0
-; CHECK: error: unsupported call to function foo in crash_call_constexpr_cast
+; CHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo
define void @crash_call_constexpr_cast() #0 {
%alloca = alloca i32
call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0
OpenPOWER on IntegriCloud