1 // RUN: mlir-translate -test-spirv-roundtrip %s | FileCheck %s
3 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
5 spv.func @ret() -> () "None" {
10 // CHECK-LABEL: @ret_val
11 spv.func @ret_val() -> (i32) "None" {
12 %0 = spv.Variable : !spv.ptr<i32, Function>
13 %1 = spv.Load "Function" %0 : i32
14 // CHECK: spv.ReturnValue {{.*}} : i32
15 spv.ReturnValue %1 : i32
18 // CHECK-LABEL: @unreachable
19 spv.func @unreachable() "None" {
23 // Unreachable blocks will be dropped during serialization.
24 // CHECK-NOT: spv.Unreachable