Skip to content

Commit 9c3674a

Browse files
googlewaltLukacma
authored andcommitted
[mlir][spirv][test] Fork test to allow testing with assertions enabled (llvm#164319)
This way, testing with --debug flag can correctly specify that it requires assertions. This is a fix for llvm#164098
1 parent dfd5271 commit 9c3674a

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// REQUIRES: asserts
2+
// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file --debug %s | FileCheck %s
3+
4+
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
5+
spirv.func @linkage_attr_test_kernel() "DontInline" attributes {} {
6+
%uchar_0 = spirv.Constant 0 : i8
7+
%ushort_1 = spirv.Constant 1 : i16
8+
%uint_0 = spirv.Constant 0 : i32
9+
spirv.FunctionCall @outside.func.with.linkage(%uchar_0):(i8) -> ()
10+
spirv.Return
11+
}
12+
// CHECK: linkage_attributes = #spirv.linkage_attributes<linkage_name = "outside.func", linkage_type = <Import>>
13+
spirv.func @outside.func.with.linkage(%arg0 : i8) -> () "Pure" attributes {
14+
linkage_attributes=#spirv.linkage_attributes<
15+
linkage_name="outside.func",
16+
linkage_type=<Import>
17+
>
18+
}
19+
spirv.func @inside.func() -> () "Pure" attributes {} {spirv.Return}
20+
}

mlir/test/Target/SPIRV/function-decorations.mlir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file %s | FileCheck %s
2-
// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file --debug %s | FileCheck %s
32

43
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
54
spirv.func @linkage_attr_test_kernel() "DontInline" attributes {} {

0 commit comments

Comments
 (0)