Files
clang-p2996/mlir/test/Target/SPIRV/module.mlir
Lei Zhang 0117865412 [mlir][spirv] NFC: Shuffle code around to better follow convention
This commit shuffles SPIR-V code around to better follow MLIR
convention. Specifically,

* Created IR/, Transforms/, Linking/, and Utils/ subdirectories and
  moved suitable code inside.
* Created SPIRVEnums.{h|cpp} for SPIR-V C/C++ enums generated from
  SPIR-V spec. Previously they are cluttered inside SPIRVTypes.{h|cpp}.
* Fixed include guards in various header files (both .h and .td).
* Moved serialization tests under test/Target/SPIRV.
* Renamed TableGen backend -gen-spirv-op-utils into -gen-spirv-attr-utils
  as it is only generating utility functions for attributes.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D93407
2020-12-17 11:03:26 -05:00

33 lines
795 B
MLIR

// RUN: mlir-translate -test-spirv-roundtrip -split-input-file %s | FileCheck %s
// CHECK: spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
// CHECK-NEXT: spv.func @foo() "Inline" {
// CHECK-NEXT: spv.Return
// CHECK-NEXT: }
// CHECK-NEXT: }
spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
spv.func @foo() -> () "Inline" {
spv.Return
}
}
// -----
// CHECK: v1.5
spv.module Logical GLSL450 requires #spv.vce<v1.5, [Shader], []> {
}
// -----
// CHECK: [Shader, Float16]
spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader, Float16], []> {
}
// -----
// CHECK: [SPV_KHR_float_controls, SPV_KHR_subgroup_vote]
spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], [SPV_KHR_float_controls, SPV_KHR_subgroup_vote]> {
}