Files
clang-p2996/mlir/test/Conversion/SPIRVToLLVM/module-ops-to-llvm.mlir
Lei Zhang 56f60a1ce7 [mlir][spirv] Use SingleBlock + NoTerminator for spv.module
This allows us to remove the `spv.mlir.endmodule` op and
all the code associated with it.

Along the way, tightened the APIs for `spv.module` a bit
by removing some aliases. Now we use `getRegion` to get
the only region, and `getBody` to get the region's only
block.

Reviewed By: mravishankar, hanchung

Differential Revision: https://reviews.llvm.org/D103265
2021-06-09 14:00:06 -04:00

24 lines
611 B
MLIR

// RUN: mlir-opt -convert-spirv-to-llvm %s | FileCheck %s
//===----------------------------------------------------------------------===//
// spv.module
//===----------------------------------------------------------------------===//
// CHECK: module
spv.module Logical GLSL450 {}
// CHECK: module @foo
spv.module @foo Logical GLSL450 {}
// CHECK: module
spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], [SPV_KHR_16bit_storage]> {}
// CHECK: module
spv.module Logical GLSL450 {
// CHECK-LABEL: llvm.func @empty()
spv.func @empty() -> () "None" {
// CHECK: llvm.return
spv.Return
}
}