Skip to content

Commit b93c154

Browse files
svenvhvmaksimo
authored andcommitted
Report disallowed extension as error instead of assert
Original commit: KhronosGroup/SPIRV-LLVM-Translator@d993887
1 parent a7bf89f commit b93c154

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

llvm-spirv/test/transcoding/SPV_KHR_integer_dot_product-nonsat.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
; RUN: llvm-as %s -o %t.bc
2+
; RUN: not llvm-spirv %t.bc -spirv-text -o %t.txt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
23
; RUN: llvm-spirv %t.bc -spirv-text --spirv-ext=+SPV_KHR_integer_dot_product -o %t.txt
34
; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV
45
; RUN: llvm-spirv --spirv-ext=+SPV_KHR_integer_dot_product %t.bc -o %t.spv
56
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
67
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
78

9+
; CHECK-ERROR: Feature requires the following SPIR-V extension:
10+
; CHECK-ERROR-NEXT: SPV_KHR_integer_dot_product
11+
812
; CHECK-SPIRV: Capability DotProductInputAllKHR
913
; CHECK-SPIRV: Capability DotProductInput4x8BitKHR
1014
; CHECK-SPIRV: Capability DotProductInput4x8BitPackedKHR

llvm-spirv/test/transcoding/SPV_KHR_integer_dot_product-sat.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
; RUN: llvm-as %s -o %t.bc
2+
; RUN: not llvm-spirv %t.bc -spirv-text -o %t.txt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
23
; RUN: llvm-spirv %t.bc -spirv-text --spirv-ext=+SPV_KHR_integer_dot_product -o %t.txt
34
; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV
45
; RUN: llvm-spirv --spirv-ext=+SPV_KHR_integer_dot_product %t.bc -o %t.spv
56
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
67
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
78

9+
; CHECK-ERROR: Feature requires the following SPIR-V extension:
10+
; CHECK-ERROR-NEXT: SPV_KHR_integer_dot_product
11+
812
; CHECK-SPIRV: Capability DotProductInputAllKHR
913
; CHECK-SPIRV: Capability DotProductInput4x8BitKHR
1014
; CHECK-SPIRV: Capability DotProductInput4x8BitPackedKHR

0 commit comments

Comments
 (0)