With the removal of mlir-vulkan-runner (as part of #73457) in e7e3c45bc70904e24e2b3221ac8521e67eb84668, 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 058d183980a2f334d085a46c32abded0557aa789 (#124301) which had been reverted in 4573c857da88b3210d497d9a88a89351a74b5964 due to a missing linker dependency on MLIRSPIRVTransforms in mlir/test/lib/Pass/CMakeLists.txt (fixed in this commit).
16 lines
522 B
MLIR
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>
|
|
}
|