Files
clang-p2996/mlir/test/Conversion/ConvertToSPIRV/simple.mlir
Andrea Faulds 25ae1a266d [mlir][spirv] Make ConvertToSPIRVPass into a test pass (non-public)
With the removal of mlir-vulkan-runner (as part of #73457) in
e7e3c45bc7, this pass no longer has to be
public (previously it had to be so the runner could use it). This commit
makes it instead only available for use by mlir-opt.

This is a recommit of 058d183980 (#124301)
which had been reverted in 4573c857da due
to a missing linker dependency on MLIRSPIRVTransforms in
mlir/test/lib/Pass/CMakeLists.txt (fixed in this commit).
2025-01-29 15:51:42 +01:00

16 lines
522 B
MLIR

// RUN: mlir-opt -test-convert-to-spirv="run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
// CHECK-LABEL: @return_scalar
// CHECK-SAME: %[[ARG0:.*]]: i32
// CHECK: spirv.ReturnValue %[[ARG0]]
func.func @return_scalar(%arg0 : i32) -> i32 {
return %arg0 : i32
}
// CHECK-LABEL: @return_vector
// CHECK-SAME: %[[ARG0:.*]]: vector<4xi32>
// CHECK: spirv.ReturnValue %[[ARG0]]
func.func @return_vector(%arg0 : vector<4xi32>) -> vector<4xi32> {
return %arg0 : vector<4xi32>
}