diff --git a/mlir/test/Target/SPIRV/module.mlir b/mlir/test/Target/SPIRV/module.mlir index dcdcab8097e41..d4000dfa53810 100644 --- a/mlir/test/Target/SPIRV/module.mlir +++ b/mlir/test/Target/SPIRV/module.mlir @@ -1,21 +1,29 @@ -// RUN: mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file %s | FileCheck %s +// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file %s | FileCheck %s + +// REQUIRES: shell +// RUN: %if spirv-tools %{ rm -rf %t %} +// RUN: %if spirv-tools %{ mkdir %t %} +// RUN: %if spirv-tools %{ mlir-translate --no-implicit-module --serialize-spirv --split-input-file --spirv-save-validation-files-with-prefix=%t/module %s %} +// RUN: %if spirv-tools %{ ls %t/module*.spv | xargs -I{} spirv-val {} %} // CHECK: spirv.module Logical GLSL450 requires #spirv.vce { // CHECK-NEXT: spirv.func @foo() "Inline" { // CHECK-NEXT: spirv.Return // CHECK-NEXT: } +// CHECK-NEXT: spirv.EntryPoint "Vertex" @foo // CHECK-NEXT: } spirv.module Logical GLSL450 requires #spirv.vce { spirv.func @foo() -> () "Inline" { spirv.Return } + spirv.EntryPoint "Vertex" @foo } // ----- // CHECK: v1.5 -spirv.module Logical GLSL450 requires #spirv.vce { +spirv.module Logical GLSL450 requires #spirv.vce { } // ----- @@ -26,13 +34,13 @@ spirv.module Logical GLSL450 requires #spirv.vce { // ----- -// CHECK: [Shader, Float16] -spirv.module Logical GLSL450 requires #spirv.vce { +// CHECK: [Shader, Float16, Linkage] +spirv.module Logical GLSL450 requires #spirv.vce { } // ----- // CHECK: [SPV_KHR_float_controls, SPV_KHR_subgroup_vote] -spirv.module Logical GLSL450 requires #spirv.vce { +spirv.module Logical GLSL450 requires #spirv.vce { }