[Mlir-commits] [mlir] dc693a0 - [MLIR][SPIRVToLLVM] Removed std to llvm patterns from the conversion

George Mitenkov llvmlistbot at llvm.org
Thu Aug 20 14:28:33 PDT 2020


Author: George Mitenkov
Date: 2020-08-21T00:26:33+03:00
New Revision: dc693a036de4da8e89b1805ae2ae1cb637d37ba4

URL: https://github.com/llvm/llvm-project/commit/dc693a036de4da8e89b1805ae2ae1cb637d37ba4
DIFF: https://github.com/llvm/llvm-project/commit/dc693a036de4da8e89b1805ae2ae1cb637d37ba4.diff

LOG: [MLIR][SPIRVToLLVM] Removed std to llvm patterns from the conversion

Removed the Standard to LLVM conversion patterns that were previously
pulled in for testing purposes. This helps to separate the conversion
to LLVM dialect of the MLIR module with both SPIR-V and Standard
dialects in it (particularly helpful for SPIR-V cpu runner). Also,
tests were changed accordingly.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D86285

Added: 
    

Modified: 
    mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
    mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/bitwise-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/cast-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/comparison-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/func-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/glsl-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/logical-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/shift-ops-to-llvm.mlir
    mlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp b/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
index 1a806d04d9fc0..73d64b01df5d8 100644
--- a/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
+++ b/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
@@ -41,11 +41,6 @@ void ConvertSPIRVToLLVMPass::runOnOperation() {
   populateSPIRVToLLVMConversionPatterns(context, converter, patterns);
   populateSPIRVToLLVMFunctionConversionPatterns(context, converter, patterns);
 
-  // Currently pulls in Std to LLVM conversion patterns
-  // that help with testing. This allows to convert
-  // function arguments to LLVM.
-  populateStdToLLVMConversionPatterns(converter, patterns);
-
   ConversionTarget target(getContext());
   target.addIllegalDialect<spirv::SPIRVDialect>();
   target.addLegalDialect<LLVM::LLVMDialect>();

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir
index a37e82bf59953..ab202e5b06223 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir
@@ -5,17 +5,17 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @iadd_scalar
-func @iadd_scalar(%arg0: i32, %arg1: i32) {
+spv.func @iadd_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.add %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.IAdd %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @iadd_vector
-func @iadd_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) {
+spv.func @iadd_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) "None" {
   // CHECK: llvm.add %{{.*}}, %{{.*}} : !llvm.vec<4 x i64>
   %0 = spv.IAdd %arg0, %arg1 : vector<4xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -23,17 +23,17 @@ func @iadd_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @isub_scalar
-func @isub_scalar(%arg0: i8, %arg1: i8) {
+spv.func @isub_scalar(%arg0: i8, %arg1: i8) "None" {
   // CHECK: llvm.sub %{{.*}}, %{{.*}} : !llvm.i8
   %0 = spv.ISub %arg0, %arg1 : i8
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @isub_vector
-func @isub_vector(%arg0: vector<2xi16>, %arg1: vector<2xi16>) {
+spv.func @isub_vector(%arg0: vector<2xi16>, %arg1: vector<2xi16>) "None" {
   // CHECK: llvm.sub %{{.*}}, %{{.*}} : !llvm.vec<2 x i16>
   %0 = spv.ISub %arg0, %arg1 : vector<2xi16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -41,17 +41,17 @@ func @isub_vector(%arg0: vector<2xi16>, %arg1: vector<2xi16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @imul_scalar
-func @imul_scalar(%arg0: i32, %arg1: i32) {
+spv.func @imul_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.mul %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.IMul %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @imul_vector
-func @imul_vector(%arg0: vector<3xi32>, %arg1: vector<3xi32>) {
+spv.func @imul_vector(%arg0: vector<3xi32>, %arg1: vector<3xi32>) "None" {
   // CHECK: llvm.mul %{{.*}}, %{{.*}} : !llvm.vec<3 x i32>
   %0 = spv.IMul %arg0, %arg1 : vector<3xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -59,17 +59,17 @@ func @imul_vector(%arg0: vector<3xi32>, %arg1: vector<3xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fadd_scalar
-func @fadd_scalar(%arg0: f16, %arg1: f16) {
+spv.func @fadd_scalar(%arg0: f16, %arg1: f16) "None" {
   // CHECK: llvm.fadd %{{.*}}, %{{.*}} : !llvm.half
   %0 = spv.FAdd %arg0, %arg1 : f16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @fadd_vector
-func @fadd_vector(%arg0: vector<4xf32>, %arg1: vector<4xf32>) {
+spv.func @fadd_vector(%arg0: vector<4xf32>, %arg1: vector<4xf32>) "None" {
   // CHECK: llvm.fadd %{{.*}}, %{{.*}} : !llvm.vec<4 x float>
   %0 = spv.FAdd %arg0, %arg1 : vector<4xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -77,17 +77,17 @@ func @fadd_vector(%arg0: vector<4xf32>, %arg1: vector<4xf32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fsub_scalar
-func @fsub_scalar(%arg0: f32, %arg1: f32) {
+spv.func @fsub_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fsub %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FSub %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @fsub_vector
-func @fsub_vector(%arg0: vector<2xf32>, %arg1: vector<2xf32>) {
+spv.func @fsub_vector(%arg0: vector<2xf32>, %arg1: vector<2xf32>) "None" {
   // CHECK: llvm.fsub %{{.*}}, %{{.*}} : !llvm.vec<2 x float>
   %0 = spv.FSub %arg0, %arg1 : vector<2xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -95,17 +95,17 @@ func @fsub_vector(%arg0: vector<2xf32>, %arg1: vector<2xf32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fdiv_scalar
-func @fdiv_scalar(%arg0: f32, %arg1: f32) {
+spv.func @fdiv_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fdiv %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FDiv %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @fdiv_vector
-func @fdiv_vector(%arg0: vector<3xf64>, %arg1: vector<3xf64>) {
+spv.func @fdiv_vector(%arg0: vector<3xf64>, %arg1: vector<3xf64>) "None" {
   // CHECK: llvm.fdiv %{{.*}}, %{{.*}} : !llvm.vec<3 x double>
   %0 = spv.FDiv %arg0, %arg1 : vector<3xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -113,17 +113,17 @@ func @fdiv_vector(%arg0: vector<3xf64>, %arg1: vector<3xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fmul_scalar
-func @fmul_scalar(%arg0: f32, %arg1: f32) {
+spv.func @fmul_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fmul %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FMul %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @fmul_vector
-func @fmul_vector(%arg0: vector<2xf32>, %arg1: vector<2xf32>) {
+spv.func @fmul_vector(%arg0: vector<2xf32>, %arg1: vector<2xf32>) "None" {
   // CHECK: llvm.fmul %{{.*}}, %{{.*}} : !llvm.vec<2 x float>
   %0 = spv.FMul %arg0, %arg1 : vector<2xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -131,17 +131,17 @@ func @fmul_vector(%arg0: vector<2xf32>, %arg1: vector<2xf32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @frem_scalar
-func @frem_scalar(%arg0: f32, %arg1: f32) {
+spv.func @frem_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.frem %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FRem %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @frem_vector
-func @frem_vector(%arg0: vector<3xf64>, %arg1: vector<3xf64>) {
+spv.func @frem_vector(%arg0: vector<3xf64>, %arg1: vector<3xf64>) "None" {
   // CHECK: llvm.frem %{{.*}}, %{{.*}} : !llvm.vec<3 x double>
   %0 = spv.FRem %arg0, %arg1 : vector<3xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -149,17 +149,17 @@ func @frem_vector(%arg0: vector<3xf64>, %arg1: vector<3xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fneg_scalar
-func @fneg_scalar(%arg: f64) {
+spv.func @fneg_scalar(%arg: f64) "None" {
   // CHECK: llvm.fneg %{{.*}} : !llvm.double
   %0 = spv.FNegate %arg : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @fneg_vector
-func @fneg_vector(%arg: vector<2xf32>) {
+spv.func @fneg_vector(%arg: vector<2xf32>) "None" {
   // CHECK: llvm.fneg %{{.*}} : !llvm.vec<2 x float>
   %0 = spv.FNegate %arg : vector<2xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -167,17 +167,17 @@ func @fneg_vector(%arg: vector<2xf32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @udiv_scalar
-func @udiv_scalar(%arg0: i32, %arg1: i32) {
+spv.func @udiv_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.udiv %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.UDiv %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @udiv_vector
-func @udiv_vector(%arg0: vector<3xi64>, %arg1: vector<3xi64>) {
+spv.func @udiv_vector(%arg0: vector<3xi64>, %arg1: vector<3xi64>) "None" {
   // CHECK: llvm.udiv %{{.*}}, %{{.*}} : !llvm.vec<3 x i64>
   %0 = spv.UDiv %arg0, %arg1 : vector<3xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -185,17 +185,17 @@ func @udiv_vector(%arg0: vector<3xi64>, %arg1: vector<3xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @umod_scalar
-func @umod_scalar(%arg0: i32, %arg1: i32) {
+spv.func @umod_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.urem %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.UMod %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @umod_vector
-func @umod_vector(%arg0: vector<3xi64>, %arg1: vector<3xi64>) {
+spv.func @umod_vector(%arg0: vector<3xi64>, %arg1: vector<3xi64>) "None" {
   // CHECK: llvm.urem %{{.*}}, %{{.*}} : !llvm.vec<3 x i64>
   %0 = spv.UMod %arg0, %arg1 : vector<3xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -203,17 +203,17 @@ func @umod_vector(%arg0: vector<3xi64>, %arg1: vector<3xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @sdiv_scalar
-func @sdiv_scalar(%arg0: i16, %arg1: i16) {
+spv.func @sdiv_scalar(%arg0: i16, %arg1: i16) "None" {
   // CHECK: llvm.sdiv %{{.*}}, %{{.*}} : !llvm.i16
   %0 = spv.SDiv %arg0, %arg1 : i16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @sdiv_vector
-func @sdiv_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @sdiv_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.sdiv %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.SDiv %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -221,15 +221,15 @@ func @sdiv_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @srem_scalar
-func @srem_scalar(%arg0: i32, %arg1: i32) {
+spv.func @srem_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.srem %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.SRem %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @srem_vector
-func @srem_vector(%arg0: vector<4xi32>, %arg1: vector<4xi32>) {
+spv.func @srem_vector(%arg0: vector<4xi32>, %arg1: vector<4xi32>) "None" {
   // CHECK: llvm.srem %{{.*}}, %{{.*}} : !llvm.vec<4 x i32>
   %0 = spv.SRem %arg0, %arg1 : vector<4xi32>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/bitwise-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/bitwise-ops-to-llvm.mlir
index e37072c7282da..4538b736fdf41 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/bitwise-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/bitwise-ops-to-llvm.mlir
@@ -5,17 +5,17 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitcount_scalar
-func @bitcount_scalar(%arg0: i16) {
+spv.func @bitcount_scalar(%arg0: i16) "None" {
   // CHECK: "llvm.intr.ctpop"(%{{.*}}) : (!llvm.i16) -> !llvm.i16
   %0 = spv.BitCount %arg0: i16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitcount_vector
-func @bitcount_vector(%arg0: vector<3xi32>) {
+spv.func @bitcount_vector(%arg0: vector<3xi32>) "None" {
   // CHECK: "llvm.intr.ctpop"(%{{.*}}) : (!llvm.vec<3 x i32>) -> !llvm.vec<3 x i32>
   %0 = spv.BitCount %arg0: vector<3xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -23,17 +23,17 @@ func @bitcount_vector(%arg0: vector<3xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitreverse_scalar
-func @bitreverse_scalar(%arg0: i64) {
+spv.func @bitreverse_scalar(%arg0: i64) "None" {
   // CHECK: "llvm.intr.bitreverse"(%{{.*}}) : (!llvm.i64) -> !llvm.i64
   %0 = spv.BitReverse %arg0: i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitreverse_vector
-func @bitreverse_vector(%arg0: vector<4xi32>) {
+spv.func @bitreverse_vector(%arg0: vector<4xi32>) "None" {
   // CHECK: "llvm.intr.bitreverse"(%{{.*}}) : (!llvm.vec<4 x i32>) -> !llvm.vec<4 x i32>
   %0 = spv.BitReverse %arg0: vector<4xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -41,8 +41,8 @@ func @bitreverse_vector(%arg0: vector<4xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitfield_insert_scalar_same_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[INSERT:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
-func @bitfield_insert_scalar_same_bit_width(%base: i32, %insert: i32, %offset: i32, %count: i32) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[INSERT:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
+spv.func @bitfield_insert_scalar_same_bit_width(%base: i32, %insert: i32, %offset: i32, %count: i32) "None" {
   // CHECK: %[[MINUS_ONE:.*]] = llvm.mlir.constant(-1 : i32) : !llvm.i32
   // CHECK: %[[T0:.*]] = llvm.shl %[[MINUS_ONE]], %[[COUNT]] : !llvm.i32
   // CHECK: %[[T1:.*]] = llvm.xor %[[T0]], %[[MINUS_ONE]] : !llvm.i32
@@ -52,12 +52,12 @@ func @bitfield_insert_scalar_same_bit_width(%base: i32, %insert: i32, %offset: i
   // CHECK: %[[SHIFTED_INSERT:.*]] = llvm.shl %[[INSERT]], %[[OFFSET]] : !llvm.i32
   // CHECK: llvm.or %[[NEW_BASE]], %[[SHIFTED_INSERT]] : !llvm.i32
   %0 = spv.BitFieldInsert %base, %insert, %offset, %count : i32, i32, i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitfield_insert_scalar_smaller_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i64, %[[INSERT:.*]]: !llvm.i64, %[[OFFSET:.*]]: !llvm.i8, %[[COUNT:.*]]: !llvm.i8
-func @bitfield_insert_scalar_smaller_bit_width(%base: i64, %insert: i64, %offset: i8, %count: i8) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i64, %[[INSERT:.*]]: !llvm.i64, %[[OFFSET:.*]]: !llvm.i8, %[[COUNT:.*]]: !llvm.i8
+spv.func @bitfield_insert_scalar_smaller_bit_width(%base: i64, %insert: i64, %offset: i8, %count: i8) "None" {
   // CHECK: %[[EXT_OFFSET:.*]] = llvm.zext %[[OFFSET]] : !llvm.i8 to !llvm.i64
   // CHECK: %[[EXT_COUNT:.*]] = llvm.zext %[[COUNT]] : !llvm.i8 to !llvm.i64
   // CHECK: %[[MINUS_ONE:.*]] = llvm.mlir.constant(-1 : i64) : !llvm.i64
@@ -69,12 +69,12 @@ func @bitfield_insert_scalar_smaller_bit_width(%base: i64, %insert: i64, %offset
   // CHECK: %[[SHIFTED_INSERT:.*]] = llvm.shl %[[INSERT]], %[[EXT_OFFSET]] : !llvm.i64
   // CHECK: llvm.or %[[NEW_BASE]], %[[SHIFTED_INSERT]] : !llvm.i64
   %0 = spv.BitFieldInsert %base, %insert, %offset, %count : i64, i8, i8
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitfield_insert_scalar_greater_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i16, %[[INSERT:.*]]: !llvm.i16, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i64
-func @bitfield_insert_scalar_greater_bit_width(%base: i16, %insert: i16, %offset: i32, %count: i64) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i16, %[[INSERT:.*]]: !llvm.i16, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i64
+spv.func @bitfield_insert_scalar_greater_bit_width(%base: i16, %insert: i16, %offset: i32, %count: i64) "None" {
   // CHECK: %[[TRUNC_OFFSET:.*]] = llvm.trunc %[[OFFSET]] : !llvm.i32 to !llvm.i16
   // CHECK: %[[TRUNC_COUNT:.*]] = llvm.trunc %[[COUNT]] : !llvm.i64 to !llvm.i16
   // CHECK: %[[MINUS_ONE:.*]] = llvm.mlir.constant(-1 : i16) : !llvm.i16
@@ -86,12 +86,12 @@ func @bitfield_insert_scalar_greater_bit_width(%base: i16, %insert: i16, %offset
   // CHECK: %[[SHIFTED_INSERT:.*]] = llvm.shl %[[INSERT]], %[[TRUNC_OFFSET]] : !llvm.i16
   // CHECK: llvm.or %[[NEW_BASE]], %[[SHIFTED_INSERT]] : !llvm.i16
   %0 = spv.BitFieldInsert %base, %insert, %offset, %count : i16, i32, i64
-  return
+  spv.Return
 }
 
-// CHECK-LABEL: func @bitfield_insert_vector
-// CHECK-SAME: %[[BASE:.*]]: !llvm.vec<2 x i32>, %[[INSERT:.*]]: !llvm.vec<2 x i32>, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
-func @bitfield_insert_vector(%base: vector<2xi32>, %insert: vector<2xi32>, %offset: i32, %count: i32) {
+// CHECK-LABEL: @bitfield_insert_vector
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.vec<2 x i32>, %[[INSERT:.*]]: !llvm.vec<2 x i32>, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
+spv.func @bitfield_insert_vector(%base: vector<2xi32>, %insert: vector<2xi32>, %offset: i32, %count: i32) "None" {
   // CHECK: %[[OFFSET_V0:.*]] = llvm.mlir.undef : !llvm.vec<2 x i32>
   // CHECK: %[[ZERO:.*]] = llvm.mlir.constant(0 : i32) : !llvm.i32
   // CHECK: %[[OFFSET_V1:.*]] = llvm.insertelement %[[OFFSET]], %[[OFFSET_V0]][%[[ZERO]] : !llvm.i32] : !llvm.vec<2 x i32>
@@ -111,7 +111,7 @@ func @bitfield_insert_vector(%base: vector<2xi32>, %insert: vector<2xi32>, %offs
   // CHECK: %[[SHIFTED_INSERT:.*]] = llvm.shl %[[INSERT]], %[[OFFSET_V2]] : !llvm.vec<2 x i32>
   // CHECK: llvm.or %[[NEW_BASE]], %[[SHIFTED_INSERT]] : !llvm.vec<2 x i32>
   %0 = spv.BitFieldInsert %base, %insert, %offset, %count : vector<2xi32>, i32, i32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -119,8 +119,8 @@ func @bitfield_insert_vector(%base: vector<2xi32>, %insert: vector<2xi32>, %offs
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitfield_sextract_scalar_same_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i64, %[[OFFSET:.*]]: !llvm.i64, %[[COUNT:.*]]: !llvm.i64
-func @bitfield_sextract_scalar_same_bit_width(%base: i64, %offset: i64, %count: i64) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i64, %[[OFFSET:.*]]: !llvm.i64, %[[COUNT:.*]]: !llvm.i64
+spv.func @bitfield_sextract_scalar_same_bit_width(%base: i64, %offset: i64, %count: i64) "None" {
   // CHECK: %[[SIZE:.]] = llvm.mlir.constant(64 : i64) : !llvm.i64
   // CHECK: %[[T0:.*]] = llvm.add %[[COUNT]], %[[OFFSET]] : !llvm.i64
   // CHECK: %[[T1:.*]] = llvm.sub %[[SIZE]], %[[T0]] : !llvm.i64
@@ -128,12 +128,12 @@ func @bitfield_sextract_scalar_same_bit_width(%base: i64, %offset: i64, %count:
   // CHECK: %[[T2:.*]] = llvm.add %[[OFFSET]], %[[T1]] : !llvm.i64
   // CHECK: llvm.ashr %[[SHIFTED_LEFT]], %[[T2]] : !llvm.i64
   %0 = spv.BitFieldSExtract %base, %offset, %count : i64, i64, i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitfield_sextract_scalar_smaller_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i8, %[[COUNT:.*]]: !llvm.i8
-func @bitfield_sextract_scalar_smaller_bit_width(%base: i32, %offset: i8, %count: i8) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i8, %[[COUNT:.*]]: !llvm.i8
+spv.func @bitfield_sextract_scalar_smaller_bit_width(%base: i32, %offset: i8, %count: i8) "None" {
   // CHECK: %[[EXT_OFFSET:.*]] = llvm.zext %[[OFFSET]] : !llvm.i8 to !llvm.i32
   // CHECK: %[[EXT_COUNT:.*]] = llvm.zext %[[COUNT]] : !llvm.i8 to !llvm.i32
   // CHECK: %[[SIZE:.]] = llvm.mlir.constant(32 : i32) : !llvm.i32
@@ -143,12 +143,12 @@ func @bitfield_sextract_scalar_smaller_bit_width(%base: i32, %offset: i8, %count
   // CHECK: %[[T2:.*]] = llvm.add %[[EXT_OFFSET]], %[[T1]] : !llvm.i32
   // CHECK: llvm.ashr %[[SHIFTED_LEFT]], %[[T2]] : !llvm.i32
   %0 = spv.BitFieldSExtract %base, %offset, %count : i32, i8, i8
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitfield_sextract_scalar_greater_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i64, %[[COUNT:.*]]: !llvm.i64
-func @bitfield_sextract_scalar_greater_bit_width(%base: i32, %offset: i64, %count: i64) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i64, %[[COUNT:.*]]: !llvm.i64
+spv.func @bitfield_sextract_scalar_greater_bit_width(%base: i32, %offset: i64, %count: i64) "None" {
   // CHECK: %[[TRUNC_OFFSET:.*]] = llvm.trunc %[[OFFSET]] : !llvm.i64 to !llvm.i32
   // CHECK: %[[TRUNC_COUNT:.*]] = llvm.trunc %[[COUNT]] : !llvm.i64 to !llvm.i32
   // CHECK: %[[SIZE:.]] = llvm.mlir.constant(32 : i32) : !llvm.i32
@@ -158,12 +158,12 @@ func @bitfield_sextract_scalar_greater_bit_width(%base: i32, %offset: i64, %coun
   // CHECK: %[[T2:.*]] = llvm.add %[[TRUNC_OFFSET]], %[[T1]] : !llvm.i32
   // CHECK: llvm.ashr %[[SHIFTED_LEFT]], %[[T2]] : !llvm.i32
   %0 = spv.BitFieldSExtract %base, %offset, %count : i32, i64, i64
-  return
+  spv.Return
 }
 
-// CHECK-LABEL: func @bitfield_sextract_vector
-// CHECK-SAME: %[[BASE:.*]]: !llvm.vec<2 x i32>, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
-func @bitfield_sextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32) {
+// CHECK-LABEL: @bitfield_sextract_vector
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.vec<2 x i32>, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
+spv.func @bitfield_sextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32) "None" {
   // CHECK: %[[OFFSET_V0:.*]] = llvm.mlir.undef : !llvm.vec<2 x i32>
   // CHECK: %[[ZERO:.*]] = llvm.mlir.constant(0 : i32) : !llvm.i32
   // CHECK: %[[OFFSET_V1:.*]] = llvm.insertelement %[[OFFSET]], %[[OFFSET_V0]][%[[ZERO]] : !llvm.i32] : !llvm.vec<2 x i32>
@@ -181,7 +181,7 @@ func @bitfield_sextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32)
   // CHECK: %[[T2:.*]] = llvm.add %[[OFFSET_V2]], %[[T1]] : !llvm.vec<2 x i32>
   // CHECK: llvm.ashr %[[SHIFTED_LEFT]], %[[T2]] : !llvm.vec<2 x i32>
   %0 = spv.BitFieldSExtract %base, %offset, %count : vector<2xi32>, i32, i32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -189,20 +189,20 @@ func @bitfield_sextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32)
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitfield_uextract_scalar_same_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
-func @bitfield_uextract_scalar_same_bit_width(%base: i32, %offset: i32, %count: i32) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
+spv.func @bitfield_uextract_scalar_same_bit_width(%base: i32, %offset: i32, %count: i32) "None" {
   // CHECK: %[[MINUS_ONE:.*]] = llvm.mlir.constant(-1 : i32) : !llvm.i32
   // CHECK: %[[T0:.*]] = llvm.shl %[[MINUS_ONE]], %[[COUNT]] : !llvm.i32
   // CHECK: %[[MASK:.*]] = llvm.xor %[[T0]], %[[MINUS_ONE]] : !llvm.i32
   // CHECK: %[[SHIFTED_BASE:.*]] = llvm.lshr %[[BASE]], %[[OFFSET]] : !llvm.i32
   // CHECK: llvm.and %[[SHIFTED_BASE]], %[[MASK]] : !llvm.i32
   %0 = spv.BitFieldUExtract %base, %offset, %count : i32, i32, i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitfield_uextract_scalar_smaller_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i16, %[[COUNT:.*]]: !llvm.i8
-func @bitfield_uextract_scalar_smaller_bit_width(%base: i32, %offset: i16, %count: i8) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i32, %[[OFFSET:.*]]: !llvm.i16, %[[COUNT:.*]]: !llvm.i8
+spv.func @bitfield_uextract_scalar_smaller_bit_width(%base: i32, %offset: i16, %count: i8) "None" {
   // CHECK: %[[EXT_OFFSET:.*]] = llvm.zext %[[OFFSET]] : !llvm.i16 to !llvm.i32
   // CHECK: %[[EXT_COUNT:.*]] = llvm.zext %[[COUNT]] : !llvm.i8 to !llvm.i32
   // CHECK: %[[MINUS_ONE:.*]] = llvm.mlir.constant(-1 : i32) : !llvm.i32
@@ -211,12 +211,12 @@ func @bitfield_uextract_scalar_smaller_bit_width(%base: i32, %offset: i16, %coun
   // CHECK: %[[SHIFTED_BASE:.*]] = llvm.lshr %[[BASE]], %[[EXT_OFFSET]] : !llvm.i32
   // CHECK: llvm.and %[[SHIFTED_BASE]], %[[MASK]] : !llvm.i32
   %0 = spv.BitFieldUExtract %base, %offset, %count : i32, i16, i8
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitfield_uextract_scalar_greater_bit_width
-// CHECK-SAME: %[[BASE:.*]]: !llvm.i8, %[[OFFSET:.*]]: !llvm.i16, %[[COUNT:.*]]: !llvm.i8
-func @bitfield_uextract_scalar_greater_bit_width(%base: i8, %offset: i16, %count: i8) {
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.i8, %[[OFFSET:.*]]: !llvm.i16, %[[COUNT:.*]]: !llvm.i8
+spv.func @bitfield_uextract_scalar_greater_bit_width(%base: i8, %offset: i16, %count: i8) "None" {
   // CHECK: %[[TRUNC_OFFSET:.*]] = llvm.trunc %[[OFFSET]] : !llvm.i16 to !llvm.i8
   // CHECK: %[[MINUS_ONE:.*]] = llvm.mlir.constant(-1 : i8) : !llvm.i8
   // CHECK: %[[T0:.*]] = llvm.shl %[[MINUS_ONE]], %[[COUNT]] : !llvm.i8
@@ -224,12 +224,12 @@ func @bitfield_uextract_scalar_greater_bit_width(%base: i8, %offset: i16, %count
   // CHECK: %[[SHIFTED_BASE:.*]] = llvm.lshr %[[BASE]], %[[TRUNC_OFFSET]] : !llvm.i8
   // CHECK: llvm.and %[[SHIFTED_BASE]], %[[MASK]] : !llvm.i8
   %0 = spv.BitFieldUExtract %base, %offset, %count : i8, i16, i8
-  return
+  spv.Return
 }
 
-// CHECK-LABEL: func @bitfield_uextract_vector
-// CHECK-SAME: %[[BASE:.*]]: !llvm.vec<2 x i32>, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
-func @bitfield_uextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32) {
+// CHECK-LABEL: @bitfield_uextract_vector
+//  CHECK-SAME: %[[BASE:.*]]: !llvm.vec<2 x i32>, %[[OFFSET:.*]]: !llvm.i32, %[[COUNT:.*]]: !llvm.i32
+spv.func @bitfield_uextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32) "None" {
   // CHECK: %[[OFFSET_V0:.*]] = llvm.mlir.undef : !llvm.vec<2 x i32>
   // CHECK: %[[ZERO:.*]] = llvm.mlir.constant(0 : i32) : !llvm.i32
   // CHECK: %[[OFFSET_V1:.*]] = llvm.insertelement %[[OFFSET]], %[[OFFSET_V0]][%[[ZERO]] : !llvm.i32] : !llvm.vec<2 x i32>
@@ -246,7 +246,7 @@ func @bitfield_uextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32)
   // CHECK: %[[SHIFTED_BASE:.*]] = llvm.lshr %[[BASE]], %[[OFFSET_V2]] : !llvm.vec<2 x i32>
   // CHECK: llvm.and %[[SHIFTED_BASE]], %[[MASK]] : !llvm.vec<2 x i32>
   %0 = spv.BitFieldUExtract %base, %offset, %count : vector<2xi32>, i32, i32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -254,17 +254,17 @@ func @bitfield_uextract_vector(%base: vector<2xi32>, %offset: i32, %count: i32)
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitwise_and_scalar
-func @bitwise_and_scalar(%arg0: i32, %arg1: i32) {
+spv.func @bitwise_and_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.and %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.BitwiseAnd %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitwise_and_vector
-func @bitwise_and_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) {
+spv.func @bitwise_and_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) "None" {
   // CHECK: llvm.and %{{.*}}, %{{.*}} : !llvm.vec<4 x i64>
   %0 = spv.BitwiseAnd %arg0, %arg1 : vector<4xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -272,17 +272,17 @@ func @bitwise_and_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitwise_or_scalar
-func @bitwise_or_scalar(%arg0: i64, %arg1: i64) {
+spv.func @bitwise_or_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.or %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.BitwiseOr %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitwise_or_vector
-func @bitwise_or_vector(%arg0: vector<3xi8>, %arg1: vector<3xi8>) {
+spv.func @bitwise_or_vector(%arg0: vector<3xi8>, %arg1: vector<3xi8>) "None" {
   // CHECK: llvm.or %{{.*}}, %{{.*}} : !llvm.vec<3 x i8>
   %0 = spv.BitwiseOr %arg0, %arg1 : vector<3xi8>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -290,17 +290,17 @@ func @bitwise_or_vector(%arg0: vector<3xi8>, %arg1: vector<3xi8>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitwise_xor_scalar
-func @bitwise_xor_scalar(%arg0: i32, %arg1: i32) {
+spv.func @bitwise_xor_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.xor %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.BitwiseXor %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitwise_xor_vector
-func @bitwise_xor_vector(%arg0: vector<2xi16>, %arg1: vector<2xi16>) {
+spv.func @bitwise_xor_vector(%arg0: vector<2xi16>, %arg1: vector<2xi16>) "None" {
   // CHECK: llvm.xor %{{.*}}, %{{.*}} : !llvm.vec<2 x i16>
   %0 = spv.BitwiseXor %arg0, %arg1 : vector<2xi16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -308,17 +308,17 @@ func @bitwise_xor_vector(%arg0: vector<2xi16>, %arg1: vector<2xi16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @not_scalar
-func @not_scalar(%arg0: i32) {
+spv.func @not_scalar(%arg0: i32) "None" {
   // CHECK: %[[CONST:.*]] = llvm.mlir.constant(-1 : i32) : !llvm.i32
   // CHECK: llvm.xor %{{.*}}, %[[CONST]] : !llvm.i32
   %0 = spv.Not %arg0 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @not_vector
-func @not_vector(%arg0: vector<2xi16>) {
+spv.func @not_vector(%arg0: vector<2xi16>) "None" {
   // CHECK: %[[CONST:.*]] = llvm.mlir.constant(dense<-1> : vector<2xi16>) : !llvm.vec<2 x i16>
   // CHECK: llvm.xor %{{.*}}, %[[CONST]] : !llvm.vec<2 x i16>
   %0 = spv.Not %arg0 : vector<2xi16>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/cast-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/cast-ops-to-llvm.mlir
index 5071783073c27..a2c8b3ffccb2e 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/cast-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/cast-ops-to-llvm.mlir
@@ -5,45 +5,45 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bitcast_float_to_integer_scalar
-func @bitcast_float_to_integer_scalar(%arg0 : f32) {
+spv.func @bitcast_float_to_integer_scalar(%arg0 : f32) "None" {
   // CHECK: llvm.bitcast {{.*}} : !llvm.float to !llvm.i32
   %0 = spv.Bitcast %arg0: f32 to i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitcast_float_to_integer_vector
-func @bitcast_float_to_integer_vector(%arg0 : vector<3xf32>) {
+spv.func @bitcast_float_to_integer_vector(%arg0 : vector<3xf32>) "None" {
   // CHECK: {{.*}} = llvm.bitcast {{.*}} : !llvm.vec<3 x float> to !llvm.vec<3 x i32>
   %0 = spv.Bitcast %arg0: vector<3xf32> to vector<3xi32>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitcast_vector_to_scalar
-func @bitcast_vector_to_scalar(%arg0 : vector<2xf32>) {
+spv.func @bitcast_vector_to_scalar(%arg0 : vector<2xf32>) "None" {
   // CHECK: {{.*}} = llvm.bitcast {{.*}} : !llvm.vec<2 x float> to !llvm.i64
   %0 = spv.Bitcast %arg0: vector<2xf32> to i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitcast_scalar_to_vector
-func @bitcast_scalar_to_vector(%arg0 : f64) {
+spv.func @bitcast_scalar_to_vector(%arg0 : f64) "None" {
   // CHECK: {{.*}} = llvm.bitcast {{.*}} : !llvm.double to !llvm.vec<2 x i32>
   %0 = spv.Bitcast %arg0: f64 to vector<2xi32>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitcast_vector_to_vector
-func @bitcast_vector_to_vector(%arg0 : vector<4xf32>) {
+spv.func @bitcast_vector_to_vector(%arg0 : vector<4xf32>) "None" {
   // CHECK: {{.*}} = llvm.bitcast {{.*}} : !llvm.vec<4 x float> to !llvm.vec<2 x i64>
   %0 = spv.Bitcast %arg0: vector<4xf32> to vector<2xi64>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bitcast_pointer
-func @bitcast_pointer(%arg0: !spv.ptr<f32, Function>) {
+spv.func @bitcast_pointer(%arg0: !spv.ptr<f32, Function>) "None" {
   // CHECK: llvm.bitcast %{{.*}} : !llvm.ptr<float> to !llvm.ptr<i32>
   %0 = spv.Bitcast %arg0 : !spv.ptr<f32, Function> to !spv.ptr<i32, Function>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -51,17 +51,17 @@ func @bitcast_pointer(%arg0: !spv.ptr<f32, Function>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @convert_float_to_signed_scalar
-func @convert_float_to_signed_scalar(%arg0: f32) {
+spv.func @convert_float_to_signed_scalar(%arg0: f32) "None" {
   // CHECK: llvm.fptosi %{{.*}} : !llvm.float to !llvm.i32
   %0 = spv.ConvertFToS %arg0: f32 to i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @convert_float_to_signed_vector
-func @convert_float_to_signed_vector(%arg0: vector<2xf32>) {
+spv.func @convert_float_to_signed_vector(%arg0: vector<2xf32>) "None" {
   // CHECK: llvm.fptosi %{{.*}} : !llvm.vec<2 x float> to !llvm.vec<2 x i32>
     %0 = spv.ConvertFToS %arg0: vector<2xf32> to vector<2xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -69,17 +69,17 @@ func @convert_float_to_signed_vector(%arg0: vector<2xf32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @convert_float_to_unsigned_scalar
-func @convert_float_to_unsigned_scalar(%arg0: f32) {
+spv.func @convert_float_to_unsigned_scalar(%arg0: f32) "None" {
   // CHECK: llvm.fptoui %{{.*}} : !llvm.float to !llvm.i32
   %0 = spv.ConvertFToU %arg0: f32 to i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @convert_float_to_unsigned_vector
-func @convert_float_to_unsigned_vector(%arg0: vector<2xf32>) {
+spv.func @convert_float_to_unsigned_vector(%arg0: vector<2xf32>) "None" {
   // CHECK: llvm.fptoui %{{.*}} : !llvm.vec<2 x float> to !llvm.vec<2 x i32>
     %0 = spv.ConvertFToU %arg0: vector<2xf32> to vector<2xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -87,17 +87,17 @@ func @convert_float_to_unsigned_vector(%arg0: vector<2xf32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @convert_signed_to_float_scalar
-func @convert_signed_to_float_scalar(%arg0: i32) {
+spv.func @convert_signed_to_float_scalar(%arg0: i32) "None" {
   // CHECK: llvm.sitofp %{{.*}} : !llvm.i32 to !llvm.float
   %0 = spv.ConvertSToF %arg0: i32 to f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @convert_signed_to_float_vector
-func @convert_signed_to_float_vector(%arg0: vector<3xi32>) {
+spv.func @convert_signed_to_float_vector(%arg0: vector<3xi32>) "None" {
   // CHECK: llvm.sitofp %{{.*}} : !llvm.vec<3 x i32> to !llvm.vec<3 x float>
     %0 = spv.ConvertSToF %arg0: vector<3xi32> to vector<3xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -105,17 +105,17 @@ func @convert_signed_to_float_vector(%arg0: vector<3xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @convert_unsigned_to_float_scalar
-func @convert_unsigned_to_float_scalar(%arg0: i32) {
+spv.func @convert_unsigned_to_float_scalar(%arg0: i32) "None" {
   // CHECK: llvm.uitofp %{{.*}} : !llvm.i32 to !llvm.float
   %0 = spv.ConvertUToF %arg0: i32 to f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @convert_unsigned_to_float_vector
-func @convert_unsigned_to_float_vector(%arg0: vector<3xi32>) {
+spv.func @convert_unsigned_to_float_vector(%arg0: vector<3xi32>) "None" {
   // CHECK: llvm.uitofp %{{.*}} : !llvm.vec<3 x i32> to !llvm.vec<3 x float>
     %0 = spv.ConvertUToF %arg0: vector<3xi32> to vector<3xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -123,23 +123,23 @@ func @convert_unsigned_to_float_vector(%arg0: vector<3xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fconvert_scalar
-func @fconvert_scalar(%arg0: f32, %arg1: f64) {
+spv.func @fconvert_scalar(%arg0: f32, %arg1: f64) "None" {
   // CHECK: llvm.fpext %{{.*}} : !llvm.float to !llvm.double
   %0 = spv.FConvert %arg0: f32 to f64
 
   // CHECK: llvm.fptrunc %{{.*}} : !llvm.double to !llvm.float
   %1 = spv.FConvert %arg1: f64 to f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @fconvert_vector
-func @fconvert_vector(%arg0: vector<2xf32>, %arg1: vector<2xf64>) {
+spv.func @fconvert_vector(%arg0: vector<2xf32>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fpext %{{.*}} : !llvm.vec<2 x float> to !llvm.vec<2 x double>
   %0 = spv.FConvert %arg0: vector<2xf32> to vector<2xf64>
 
   // CHECK: llvm.fptrunc %{{.*}} : !llvm.vec<2 x double> to !llvm.vec<2 x float>
   %1 = spv.FConvert %arg1: vector<2xf64> to vector<2xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -147,23 +147,23 @@ func @fconvert_vector(%arg0: vector<2xf32>, %arg1: vector<2xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @sconvert_scalar
-func @sconvert_scalar(%arg0: i32, %arg1: i64) {
+spv.func @sconvert_scalar(%arg0: i32, %arg1: i64) "None" {
   // CHECK: llvm.sext %{{.*}} : !llvm.i32 to !llvm.i64
   %0 = spv.SConvert %arg0: i32 to i64
 
   // CHECK: llvm.trunc %{{.*}} : !llvm.i64 to !llvm.i32
   %1 = spv.SConvert %arg1: i64 to i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @sconvert_vector
-func @sconvert_vector(%arg0: vector<3xi32>, %arg1: vector<3xi64>) {
+spv.func @sconvert_vector(%arg0: vector<3xi32>, %arg1: vector<3xi64>) "None" {
   // CHECK: llvm.sext %{{.*}} : !llvm.vec<3 x i32> to !llvm.vec<3 x i64>
   %0 = spv.SConvert %arg0: vector<3xi32> to vector<3xi64>
 
   // CHECK: llvm.trunc %{{.*}} : !llvm.vec<3 x i64> to !llvm.vec<3 x i32>
   %1 = spv.SConvert %arg1: vector<3xi64> to vector<3xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -171,21 +171,21 @@ func @sconvert_vector(%arg0: vector<3xi32>, %arg1: vector<3xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @uconvert_scalar
-func @uconvert_scalar(%arg0: i32, %arg1: i64) {
+spv.func @uconvert_scalar(%arg0: i32, %arg1: i64) "None" {
   // CHECK: llvm.zext %{{.*}} : !llvm.i32 to !llvm.i64
   %0 = spv.UConvert %arg0: i32 to i64
 
   // CHECK: llvm.trunc %{{.*}} : !llvm.i64 to !llvm.i32
   %1 = spv.UConvert %arg1: i64 to i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @uconvert_vector
-func @uconvert_vector(%arg0: vector<3xi32>, %arg1: vector<3xi64>) {
+spv.func @uconvert_vector(%arg0: vector<3xi32>, %arg1: vector<3xi64>) "None" {
   // CHECK: llvm.zext %{{.*}} : !llvm.vec<3 x i32> to !llvm.vec<3 x i64>
   %0 = spv.UConvert %arg0: vector<3xi32> to vector<3xi64>
 
   // CHECK: llvm.trunc %{{.*}} : !llvm.vec<3 x i64> to !llvm.vec<3 x i32>
   %1 = spv.UConvert %arg1: vector<3xi64> to vector<3xi32>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/comparison-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/comparison-ops-to-llvm.mlir
index 0592d59ba6eef..106edc0d421cd 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/comparison-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/comparison-ops-to-llvm.mlir
@@ -5,17 +5,17 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @i_equal_scalar
-func @i_equal_scalar(%arg0: i32, %arg1: i32) {
+spv.func @i_equal_scalar(%arg0: i32, %arg1: i32) "None" {
   // CHECK: llvm.icmp "eq" %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.IEqual %arg0, %arg1 : i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @i_equal_vector
-func @i_equal_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) {
+spv.func @i_equal_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) "None" {
   // CHECK: llvm.icmp "eq" %{{.*}}, %{{.*}} : !llvm.vec<4 x i64>
   %0 = spv.IEqual %arg0, %arg1 : vector<4xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -23,17 +23,17 @@ func @i_equal_vector(%arg0: vector<4xi64>, %arg1: vector<4xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @i_not_equal_scalar
-func @i_not_equal_scalar(%arg0: i64, %arg1: i64) {
+spv.func @i_not_equal_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "ne" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.INotEqual %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @i_not_equal_vector
-func @i_not_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @i_not_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "ne" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.INotEqual %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -41,17 +41,17 @@ func @i_not_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @s_greater_than_equal_scalar
-func @s_greater_than_equal_scalar(%arg0: i64, %arg1: i64) {
+spv.func @s_greater_than_equal_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "sge" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.SGreaterThanEqual %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @s_greater_than_equal_vector
-func @s_greater_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @s_greater_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "sge" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.SGreaterThanEqual %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -59,17 +59,17 @@ func @s_greater_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @s_greater_than_scalar
-func @s_greater_than_scalar(%arg0: i64, %arg1: i64) {
+spv.func @s_greater_than_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "sgt" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.SGreaterThan %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @s_greater_than_vector
-func @s_greater_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @s_greater_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "sgt" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.SGreaterThan %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -77,17 +77,17 @@ func @s_greater_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @s_less_than_equal_scalar
-func @s_less_than_equal_scalar(%arg0: i64, %arg1: i64) {
+spv.func @s_less_than_equal_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "sle" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.SLessThanEqual %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @s_less_than_equal_vector
-func @s_less_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @s_less_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "sle" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.SLessThanEqual %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -95,17 +95,17 @@ func @s_less_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @s_less_than_scalar
-func @s_less_than_scalar(%arg0: i64, %arg1: i64) {
+spv.func @s_less_than_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "slt" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.SLessThan %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @s_less_than_vector
-func @s_less_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @s_less_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "slt" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.SLessThan %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -113,17 +113,17 @@ func @s_less_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @u_greater_than_equal_scalar
-func @u_greater_than_equal_scalar(%arg0: i64, %arg1: i64) {
+spv.func @u_greater_than_equal_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "uge" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.UGreaterThanEqual %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @u_greater_than_equal_vector
-func @u_greater_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @u_greater_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "uge" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.UGreaterThanEqual %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -131,17 +131,17 @@ func @u_greater_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @u_greater_than_scalar
-func @u_greater_than_scalar(%arg0: i64, %arg1: i64) {
+spv.func @u_greater_than_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "ugt" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.UGreaterThan %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @u_greater_than_vector
-func @u_greater_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @u_greater_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "ugt" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.UGreaterThan %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -149,17 +149,17 @@ func @u_greater_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @u_less_than_equal_scalar
-func @u_less_than_equal_scalar(%arg0: i64, %arg1: i64) {
+spv.func @u_less_than_equal_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "ule" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.ULessThanEqual %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @u_less_than_equal_vector
-func @u_less_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @u_less_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "ule" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.ULessThanEqual %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -167,17 +167,17 @@ func @u_less_than_equal_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @u_less_than_scalar
-func @u_less_than_scalar(%arg0: i64, %arg1: i64) {
+spv.func @u_less_than_scalar(%arg0: i64, %arg1: i64) "None" {
   // CHECK: llvm.icmp "ult" %{{.*}}, %{{.*}} : !llvm.i64
   %0 = spv.ULessThan %arg0, %arg1 : i64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @u_less_than_vector
-func @u_less_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
+spv.func @u_less_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) "None" {
   // CHECK: llvm.icmp "ult" %{{.*}}, %{{.*}} : !llvm.vec<2 x i64>
   %0 = spv.ULessThan %arg0, %arg1 : vector<2xi64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -185,17 +185,17 @@ func @u_less_than_vector(%arg0: vector<2xi64>, %arg1: vector<2xi64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_ord_equal_scalar
-func @f_ord_equal_scalar(%arg0: f32, %arg1: f32) {
+spv.func @f_ord_equal_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fcmp "oeq" %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FOrdEqual %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_ord_equal_vector
-func @f_ord_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
+spv.func @f_ord_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) "None" {
   // CHECK: llvm.fcmp "oeq" %{{.*}}, %{{.*}} : !llvm.vec<4 x double>
   %0 = spv.FOrdEqual %arg0, %arg1 : vector<4xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -203,17 +203,17 @@ func @f_ord_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_ord_greater_than_equal_scalar
-func @f_ord_greater_than_equal_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_ord_greater_than_equal_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "oge" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FOrdGreaterThanEqual %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_ord_greater_than_equal_vector
-func @f_ord_greater_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_ord_greater_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "oge" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FOrdGreaterThanEqual %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -221,17 +221,17 @@ func @f_ord_greater_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_ord_greater_than_scalar
-func @f_ord_greater_than_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_ord_greater_than_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "ogt" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FOrdGreaterThan %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_ord_greater_than_vector
-func @f_ord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_ord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "ogt" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FOrdGreaterThan %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -239,17 +239,17 @@ func @f_ord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_ord_less_than_scalar
-func @f_ord_less_than_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_ord_less_than_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "olt" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FOrdLessThan %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_ord_less_than_vector
-func @f_ord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_ord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "olt" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FOrdLessThan %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -257,17 +257,17 @@ func @f_ord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_ord_less_than_equal_scalar
-func @f_ord_less_than_equal_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_ord_less_than_equal_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "ole" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FOrdLessThanEqual %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_ord_less_than_equal_vector
-func @f_ord_less_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_ord_less_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "ole" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FOrdLessThanEqual %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -275,17 +275,17 @@ func @f_ord_less_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_ord_not_equal_scalar
-func @f_ord_not_equal_scalar(%arg0: f32, %arg1: f32) {
+spv.func @f_ord_not_equal_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fcmp "one" %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FOrdNotEqual %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_ord_not_equal_vector
-func @f_ord_not_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
+spv.func @f_ord_not_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) "None" {
   // CHECK: llvm.fcmp "one" %{{.*}}, %{{.*}} : !llvm.vec<4 x double>
   %0 = spv.FOrdNotEqual %arg0, %arg1 : vector<4xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -293,17 +293,17 @@ func @f_ord_not_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_unord_equal_scalar
-func @f_unord_equal_scalar(%arg0: f32, %arg1: f32) {
+spv.func @f_unord_equal_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fcmp "ueq" %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FUnordEqual %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_unord_equal_vector
-func @f_unord_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
+spv.func @f_unord_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) "None" {
   // CHECK: llvm.fcmp "ueq" %{{.*}}, %{{.*}} : !llvm.vec<4 x double>
   %0 = spv.FUnordEqual %arg0, %arg1 : vector<4xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -311,17 +311,17 @@ func @f_unord_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_unord_greater_than_equal_scalar
-func @f_unord_greater_than_equal_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_unord_greater_than_equal_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "uge" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FUnordGreaterThanEqual %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_unord_greater_than_equal_vector
-func @f_unord_greater_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_unord_greater_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "uge" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FUnordGreaterThanEqual %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -329,17 +329,17 @@ func @f_unord_greater_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf6
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_unord_greater_than_scalar
-func @f_unord_greater_than_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_unord_greater_than_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "ugt" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FUnordGreaterThan %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_unord_greater_than_vector
-func @f_unord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_unord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "ugt" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FUnordGreaterThan %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -347,17 +347,17 @@ func @f_unord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_unord_less_than_scalar
-func @f_unord_less_than_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_unord_less_than_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "ult" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FUnordLessThan %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_unord_less_than_vector
-func @f_unord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_unord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "ult" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FUnordLessThan %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -365,17 +365,17 @@ func @f_unord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_unord_less_than_equal_scalar
-func @f_unord_less_than_equal_scalar(%arg0: f64, %arg1: f64) {
+spv.func @f_unord_less_than_equal_scalar(%arg0: f64, %arg1: f64) "None" {
   // CHECK: llvm.fcmp "ule" %{{.*}}, %{{.*}} : !llvm.double
   %0 = spv.FUnordLessThanEqual %arg0, %arg1 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_unord_less_than_equal_vector
-func @f_unord_less_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) {
+spv.func @f_unord_less_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
   // CHECK: llvm.fcmp "ule" %{{.*}}, %{{.*}} : !llvm.vec<2 x double>
   %0 = spv.FUnordLessThanEqual %arg0, %arg1 : vector<2xf64>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -383,15 +383,15 @@ func @f_unord_less_than_equal_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>)
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @f_unord_not_equal_scalar
-func @f_unord_not_equal_scalar(%arg0: f32, %arg1: f32) {
+spv.func @f_unord_not_equal_scalar(%arg0: f32, %arg1: f32) "None" {
   // CHECK: llvm.fcmp "une" %{{.*}}, %{{.*}} : !llvm.float
   %0 = spv.FUnordNotEqual %arg0, %arg1 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @f_unord_not_equal_vector
-func @f_unord_not_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) {
+spv.func @f_unord_not_equal_vector(%arg0: vector<4xf64>, %arg1: vector<4xf64>) "None" {
   // CHECK: llvm.fcmp "une" %{{.*}}, %{{.*}} : !llvm.vec<4 x double>
   %0 = spv.FUnordNotEqual %arg0, %arg1 : vector<4xf64>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir
index 90fb3afdde798..52038f9f3c197 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir
@@ -5,57 +5,57 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @bool_constant_scalar
-func @bool_constant_scalar() {
+spv.func @bool_constant_scalar() "None" {
   // CHECK: llvm.mlir.constant(true) : !llvm.i1
   %0 = spv.constant true
   // CHECK: llvm.mlir.constant(false) : !llvm.i1
   %1 = spv.constant false
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @bool_constant_vector
-func @bool_constant_vector() {
+spv.func @bool_constant_vector() "None" {
   // CHECK: llvm.mlir.constant(dense<[true, false]> : vector<2xi1>) : !llvm.vec<2 x i1>
-  %0 = constant dense<[true, false]> : vector<2xi1>
+  %0 = spv.constant dense<[true, false]> : vector<2xi1>
   // CHECK: llvm.mlir.constant(dense<false> : vector<3xi1>) : !llvm.vec<3 x i1>
-  %1 = constant dense<false> : vector<3xi1>
-  return
+  %1 = spv.constant dense<false> : vector<3xi1>
+  spv.Return
 }
 
 // CHECK-LABEL: @integer_constant_scalar
-func @integer_constant_scalar() {
+spv.func @integer_constant_scalar() "None" {
   // CHECK: llvm.mlir.constant(0 : i8) : !llvm.i8
   %0 = spv.constant  0 : i8
   // CHECK: llvm.mlir.constant(-5 : i64) : !llvm.i64
   %1 = spv.constant -5 : si64
   // CHECK: llvm.mlir.constant(10 : i16) : !llvm.i16
   %2 = spv.constant  10 : ui16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @integer_constant_vector
-func @integer_constant_vector() {
+spv.func @integer_constant_vector() "None" {
   // CHECK: llvm.mlir.constant(dense<[2, 3]> : vector<2xi32>) : !llvm.vec<2 x i32>
   %0 = spv.constant dense<[2, 3]> : vector<2xi32>
   // CHECK: llvm.mlir.constant(dense<-4> : vector<2xi32>) : !llvm.vec<2 x i32>
   %1 = spv.constant dense<-4> : vector<2xsi32>
   // CHECK: llvm.mlir.constant(dense<[2, 3, 4]> : vector<3xi32>) : !llvm.vec<3 x i32>
   %2 = spv.constant dense<[2, 3, 4]> : vector<3xui32>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @float_constant_scalar
-func @float_constant_scalar() {
+spv.func @float_constant_scalar() "None" {
   // CHECK: llvm.mlir.constant(5.000000e+00 : f16) : !llvm.half
   %0 = spv.constant 5.000000e+00 : f16
   // CHECK: llvm.mlir.constant(5.000000e+00 : f64) : !llvm.double
   %1 = spv.constant 5.000000e+00 : f64
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @float_constant_vector
-func @float_constant_vector() {
+spv.func @float_constant_vector() "None" {
   // CHECK: llvm.mlir.constant(dense<[2.000000e+00, 3.000000e+00]> : vector<2xf32>) : !llvm.vec<2 x float>
   %0 = spv.constant dense<[2.000000e+00, 3.000000e+00]> : vector<2xf32>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/func-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/func-ops-to-llvm.mlir
index 21d3ce43b556a..04bc25c3f76fb 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/func-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/func-ops-to-llvm.mlir
@@ -5,7 +5,7 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @return
-func @return() {
+spv.func @return() "None" {
   // CHECK: llvm.return
   spv.Return
 }
@@ -15,7 +15,7 @@ func @return() {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @return_value
-func @return_value(%arg: i32) {
+spv.func @return_value(%arg: i32) -> i32 "None" {
   // CHECK: llvm.return %{{.*}} : !llvm.i32
   spv.ReturnValue %arg : i32
 }
@@ -25,32 +25,32 @@ func @return_value(%arg: i32) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: llvm.func @none()
-spv.func @none() -> () "None" {
+spv.func @none() "None" {
   spv.Return
 }
 
 // CHECK-LABEL: llvm.func @inline() attributes {passthrough = ["alwaysinline"]}
-spv.func @inline() -> () "Inline" {
+spv.func @inline() "Inline" {
   spv.Return
 }
 
 // CHECK-LABEL: llvm.func @dont_inline() attributes {passthrough = ["noinline"]}
-spv.func @dont_inline() -> () "DontInline" {
+spv.func @dont_inline() "DontInline" {
   spv.Return
 }
 
 // CHECK-LABEL: llvm.func @pure() attributes {passthrough = ["readonly"]}
-spv.func @pure() -> () "Pure" {
+spv.func @pure() "Pure" {
   spv.Return
 }
 
 // CHECK-LABEL: llvm.func @const() attributes {passthrough = ["readnone"]}
-spv.func @const() -> () "Const" {
+spv.func @const() "Const" {
   spv.Return
 }
 
 // CHECK-LABEL: llvm.func @scalar_types(%arg0: !llvm.i32, %arg1: !llvm.i1, %arg2: !llvm.double, %arg3: !llvm.float)
-spv.func @scalar_types(%arg0: i32, %arg1: i1, %arg2: f64, %arg3: f32) -> () "None" {
+spv.func @scalar_types(%arg0: i32, %arg1: i1, %arg2: f64, %arg3: f32) "None" {
   spv.Return
 }
 
@@ -66,7 +66,7 @@ spv.func @vector_types(%arg0: vector<2xi64>, %arg1: vector<2xi64>) -> vector<2xi
 
 // CHECK-LABEL: llvm.func @function_calls
 // CHECK-SAME: %[[ARG0:.*]]: !llvm.i32, %[[ARG1:.*]]: !llvm.i1, %[[ARG2:.*]]: !llvm.double, %[[ARG3:.*]]: !llvm.vec<2 x i64>, %[[ARG4:.*]]: !llvm.vec<2 x float>
-spv.func @function_calls(%arg0: i32, %arg1: i1, %arg2: f64, %arg3: vector<2xi64>, %arg4: vector<2xf32>) -> () "None" {
+spv.func @function_calls(%arg0: i32, %arg1: i1, %arg2: f64, %arg3: vector<2xi64>, %arg4: vector<2xf32>) "None" {
   // CHECK: llvm.call @void_1() : () -> ()
   // CHECK: llvm.call @void_2(%[[ARG3]]) : (!llvm.vec<2 x i64>) -> ()
   // CHECK: llvm.call @value_scalar(%[[ARG0]], %[[ARG1]], %[[ARG2]]) : (!llvm.i32, !llvm.i1, !llvm.double) -> !llvm.i32
@@ -78,11 +78,11 @@ spv.func @function_calls(%arg0: i32, %arg1: i1, %arg2: f64, %arg3: vector<2xi64>
   spv.Return
 }
 
-spv.func @void_1() -> () "None" {
+spv.func @void_1() "None" {
   spv.Return
 }
 
-spv.func @void_2(%arg0: vector<2xi64>) -> () "None" {
+spv.func @void_2(%arg0: vector<2xi64>) "None" {
   spv.Return
 }
 

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/glsl-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/glsl-ops-to-llvm.mlir
index 0cb975da56532..c096fc0308ff0 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/glsl-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/glsl-ops-to-llvm.mlir
@@ -5,12 +5,12 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @ceil
-func @ceil(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @ceil(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.ceil"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Ceil %arg0 : f32
   // CHECK: "llvm.intr.ceil"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Ceil %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -18,12 +18,12 @@ func @ceil(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @cos
-func @cos(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @cos(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.cos"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Cos %arg0 : f32
   // CHECK: "llvm.intr.cos"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Cos %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -31,12 +31,12 @@ func @cos(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @exp
-func @exp(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @exp(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.exp"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Exp %arg0 : f32
   // CHECK: "llvm.intr.exp"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Exp %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -44,12 +44,12 @@ func @exp(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fabs
-func @fabs(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @fabs(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.fabs"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.FAbs %arg0 : f32
   // CHECK: "llvm.intr.fabs"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.FAbs %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -57,12 +57,12 @@ func @fabs(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @floor
-func @floor(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @floor(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.floor"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Floor %arg0 : f32
   // CHECK: "llvm.intr.floor"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Floor %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -70,12 +70,12 @@ func @floor(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fmax
-func @fmax(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @fmax(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.maxnum"(%{{.*}}, %{{.*}}) : (!llvm.float, !llvm.float) -> !llvm.float
   %0 = spv.GLSL.FMax %arg0, %arg0 : f32
   // CHECK: "llvm.intr.maxnum"(%{{.*}}, %{{.*}}) : (!llvm.vec<3 x half>, !llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.FMax %arg1, %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -83,12 +83,12 @@ func @fmax(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @fmin
-func @fmin(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @fmin(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.minnum"(%{{.*}}, %{{.*}}) : (!llvm.float, !llvm.float) -> !llvm.float
   %0 = spv.GLSL.FMin %arg0, %arg0 : f32
   // CHECK: "llvm.intr.minnum"(%{{.*}}, %{{.*}}) : (!llvm.vec<3 x half>, !llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.FMin %arg1, %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -96,12 +96,12 @@ func @fmin(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @log
-func @log(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @log(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.log"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Log %arg0 : f32
   // CHECK: "llvm.intr.log"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Log %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -109,12 +109,12 @@ func @log(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @sin
-func @sin(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @sin(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.sin"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Sin %arg0 : f32
   // CHECK: "llvm.intr.sin"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Sin %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -122,12 +122,12 @@ func @sin(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @smax
-func @smax(%arg0: i16, %arg1: vector<3xi32>) {
+spv.func @smax(%arg0: i16, %arg1: vector<3xi32>) "None" {
   // CHECK: "llvm.intr.smax"(%{{.*}}, %{{.*}}) : (!llvm.i16, !llvm.i16) -> !llvm.i16
   %0 = spv.GLSL.SMax %arg0, %arg0 : i16
   // CHECK: "llvm.intr.smax"(%{{.*}}, %{{.*}}) : (!llvm.vec<3 x i32>, !llvm.vec<3 x i32>) -> !llvm.vec<3 x i32>
   %1 = spv.GLSL.SMax %arg1, %arg1 : vector<3xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -135,12 +135,12 @@ func @smax(%arg0: i16, %arg1: vector<3xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @smin
-func @smin(%arg0: i16, %arg1: vector<3xi32>) {
+spv.func @smin(%arg0: i16, %arg1: vector<3xi32>) "None" {
   // CHECK: "llvm.intr.smin"(%{{.*}}, %{{.*}}) : (!llvm.i16, !llvm.i16) -> !llvm.i16
   %0 = spv.GLSL.SMin %arg0, %arg0 : i16
   // CHECK: "llvm.intr.smin"(%{{.*}}, %{{.*}}) : (!llvm.vec<3 x i32>, !llvm.vec<3 x i32>) -> !llvm.vec<3 x i32>
   %1 = spv.GLSL.SMin %arg1, %arg1 : vector<3xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -148,12 +148,12 @@ func @smin(%arg0: i16, %arg1: vector<3xi32>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @sqrt
-func @sqrt(%arg0: f32, %arg1: vector<3xf16>) {
+spv.func @sqrt(%arg0: f32, %arg1: vector<3xf16>) "None" {
   // CHECK: "llvm.intr.sqrt"(%{{.*}}) : (!llvm.float) -> !llvm.float
   %0 = spv.GLSL.Sqrt %arg0 : f32
   // CHECK: "llvm.intr.sqrt"(%{{.*}}) : (!llvm.vec<3 x half>) -> !llvm.vec<3 x half>
   %1 = spv.GLSL.Sqrt %arg1 : vector<3xf16>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -161,12 +161,12 @@ func @sqrt(%arg0: f32, %arg1: vector<3xf16>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @tan
-func @tan(%arg0: f32) {
+spv.func @tan(%arg0: f32) "None" {
   // CHECK: %[[SIN:.*]] = "llvm.intr.sin"(%{{.*}}) : (!llvm.float) -> !llvm.float
   // CHECK: %[[COS:.*]] = "llvm.intr.cos"(%{{.*}}) : (!llvm.float) -> !llvm.float
   // CHECK: llvm.fdiv %[[SIN]], %[[COS]] : !llvm.float
   %0 = spv.GLSL.Tan %arg0 : f32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -174,7 +174,7 @@ func @tan(%arg0: f32) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @tanh
-func @tanh(%arg0: f32) {
+spv.func @tanh(%arg0: f32) "None" {
   // CHECK: %[[TWO:.*]] = llvm.mlir.constant(2.000000e+00 : f32) : !llvm.float
   // CHECK: %[[X2:.*]] = llvm.fmul %[[TWO]], %{{.*}} : !llvm.float
   // CHECK: %[[EXP:.*]] = "llvm.intr.exp"(%[[X2]]) : (!llvm.float) -> !llvm.float
@@ -183,7 +183,7 @@ func @tanh(%arg0: f32) {
   // CHECK: %[[T1:.*]] = llvm.fadd %[[EXP]], %[[ONE]] : !llvm.float
   // CHECK: llvm.fdiv %[[T0]], %[[T1]] : !llvm.float
   %0 = spv.GLSL.Tanh %arg0 : f32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -191,10 +191,10 @@ func @tanh(%arg0: f32) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @inverse_sqrt
-func @inverse_sqrt(%arg0: f32) {
+spv.func @inverse_sqrt(%arg0: f32) "None" {
   // CHECK: %[[ONE:.*]] = llvm.mlir.constant(1.000000e+00 : f32) : !llvm.float
   // CHECK: %[[SQRT:.*]] = "llvm.intr.sqrt"(%{{.*}}) : (!llvm.float) -> !llvm.float
   // CHECK: llvm.fdiv %[[ONE]], %[[SQRT]] : !llvm.float
   %0 = spv.GLSL.InverseSqrt %arg0 : f32
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/logical-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/logical-ops-to-llvm.mlir
index 9c9035ae89339..e2fc57b2f4907 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/logical-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/logical-ops-to-llvm.mlir
@@ -5,17 +5,17 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @logical_equal_scalar
-func @logical_equal_scalar(%arg0: i1, %arg1: i1) {
+spv.func @logical_equal_scalar(%arg0: i1, %arg1: i1) "None" {
   // CHECK: llvm.icmp "eq" %{{.*}}, %{{.*}} : !llvm.i1
   %0 = spv.LogicalEqual %arg0, %arg0 : i1
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @logical_equal_vector
-func @logical_equal_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
+spv.func @logical_equal_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) "None" {
   // CHECK: llvm.icmp "eq" %{{.*}}, %{{.*}} : !llvm.vec<4 x i1>
   %0 = spv.LogicalEqual %arg0, %arg0 : vector<4xi1>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -23,17 +23,17 @@ func @logical_equal_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @logical_not_equal_scalar
-func @logical_not_equal_scalar(%arg0: i1, %arg1: i1) {
+spv.func @logical_not_equal_scalar(%arg0: i1, %arg1: i1) "None" {
   // CHECK: llvm.icmp "ne" %{{.*}}, %{{.*}} : !llvm.i1
   %0 = spv.LogicalNotEqual %arg0, %arg0 : i1
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @logical_not_equal_vector
-func @logical_not_equal_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
+spv.func @logical_not_equal_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) "None" {
   // CHECK: llvm.icmp "ne" %{{.*}}, %{{.*}} : !llvm.vec<4 x i1>
   %0 = spv.LogicalNotEqual %arg0, %arg0 : vector<4xi1>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -41,19 +41,19 @@ func @logical_not_equal_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @logical_not_scalar
-func @logical_not_scalar(%arg0: i1) {
+spv.func @logical_not_scalar(%arg0: i1) "None" {
   // CHECK: %[[CONST:.*]] = llvm.mlir.constant(true) : !llvm.i1
   // CHECK: llvm.xor %{{.*}}, %[[CONST]] : !llvm.i1
   %0 = spv.LogicalNot %arg0 : i1
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @logical_not_vector
-func @logical_not_vector(%arg0: vector<4xi1>) {
+spv.func @logical_not_vector(%arg0: vector<4xi1>) "None" {
   // CHECK: %[[CONST:.*]] = llvm.mlir.constant(dense<true> : vector<4xi1>) : !llvm.vec<4 x i1>
   // CHECK: llvm.xor %{{.*}}, %[[CONST]] : !llvm.vec<4 x i1>
   %0 = spv.LogicalNot %arg0 : vector<4xi1>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -61,17 +61,17 @@ func @logical_not_vector(%arg0: vector<4xi1>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @logical_and_scalar
-func @logical_and_scalar(%arg0: i1, %arg1: i1) {
+spv.func @logical_and_scalar(%arg0: i1, %arg1: i1) "None" {
   // CHECK: llvm.and %{{.*}}, %{{.*}} : !llvm.i1
   %0 = spv.LogicalAnd %arg0, %arg0 : i1
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @logical_and_vector
-func @logical_and_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
+spv.func @logical_and_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) "None" {
   // CHECK: llvm.and %{{.*}}, %{{.*}} : !llvm.vec<4 x i1>
   %0 = spv.LogicalAnd %arg0, %arg0 : vector<4xi1>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -79,15 +79,15 @@ func @logical_and_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @logical_or_scalar
-func @logical_or_scalar(%arg0: i1, %arg1: i1) {
+spv.func @logical_or_scalar(%arg0: i1, %arg1: i1) "None" {
   // CHECK: llvm.or %{{.*}}, %{{.*}} : !llvm.i1
   %0 = spv.LogicalOr %arg0, %arg0 : i1
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @logical_or_vector
-func @logical_or_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) {
+spv.func @logical_or_vector(%arg0: vector<4xi1>, %arg1: vector<4xi1>) "None" {
   // CHECK: llvm.or %{{.*}}, %{{.*}} : !llvm.vec<4 x i1>
   %0 = spv.LogicalOr %arg0, %arg0 : vector<4xi1>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
index 4402a513fb93e..68d59393cfb77 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
@@ -5,24 +5,24 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @access_chain
-func @access_chain() -> () {
+spv.func @access_chain() "None" {
   // CHECK: %[[ONE:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   %0 = spv.constant 1: i32
   %1 = spv.Variable : !spv.ptr<!spv.struct<f32, !spv.array<4xf32>>, Function>
   // CHECK: %[[ZERO:.*]] = llvm.mlir.constant(0 : i32) : !llvm.i32
   // CHECK: llvm.getelementptr %{{.*}}[%[[ZERO]], %[[ONE]], %[[ONE]]] : (!llvm.ptr<struct<packed (float, array<4 x float>)>>, !llvm.i32, !llvm.i32, !llvm.i32) -> !llvm.ptr<float>
   %2 = spv.AccessChain %1[%0, %0] : !spv.ptr<!spv.struct<f32, !spv.array<4xf32>>, Function>, i32, i32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @access_chain_array
-func @access_chain_array(%arg0 : i32) -> () {
+spv.func @access_chain_array(%arg0 : i32) "None" {
   %0 = spv.Variable : !spv.ptr<!spv.array<4x!spv.array<4xf32>>, Function>
   // CHECK: %[[ZERO:.*]] = llvm.mlir.constant(0 : i32) : !llvm.i32
   // CHECK: llvm.getelementptr %{{.*}}[%[[ZERO]], %{{.*}}] : (!llvm.ptr<array<4 x array<4 x float>>>, !llvm.i32, !llvm.i32) -> !llvm.ptr<array<4 x float>>
   %1 = spv.AccessChain %0[%arg0] : !spv.ptr<!spv.array<4x!spv.array<4xf32>>, Function>, i32
   %2 = spv.Load "Function" %1 ["Volatile"] : !spv.array<4xf32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -39,7 +39,7 @@ spv.module Logical GLSL450 {
   // CHECK-LABEL: @func
   //       CHECK: llvm.mlir.addressof @struct : !llvm.ptr<struct<packed (float, array<10 x float>)>>
   spv.globalVariable @struct : !spv.ptr<!spv.struct<f32, !spv.array<10xf32>>, Private>
-  spv.func @func() -> () "None" {
+  spv.func @func() "None" {
     %0 = spv._address_of @struct : !spv.ptr<!spv.struct<f32, !spv.array<10xf32>>, Private>
     spv.Return
   }
@@ -50,43 +50,43 @@ spv.module Logical GLSL450 {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @load
-func @load() {
+spv.func @load() "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   //  CHECK: llvm.load %{{.*}} : !llvm.ptr<float>
   %1 = spv.Load "Function" %0 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @load_none
-func @load_none() {
+spv.func @load_none() "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   //  CHECK: llvm.load %{{.*}} : !llvm.ptr<float>
   %1 = spv.Load "Function" %0 ["None"] : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @load_with_alignment
-func @load_with_alignment() {
+spv.func @load_with_alignment() "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.load %{{.*}} {alignment = 4 : i64} : !llvm.ptr<float>
   %1 = spv.Load "Function" %0 ["Aligned", 4] : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @load_volatile
-func @load_volatile() {
+spv.func @load_volatile() "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.load volatile %{{.*}} : !llvm.ptr<float>
   %1 = spv.Load "Function" %0 ["Volatile"] : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @load_nontemporal
-func @load_nontemporal() {
+spv.func @load_nontemporal() "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.load %{{.*}} {nontemporal} : !llvm.ptr<float>
   %1 = spv.Load "Function" %0 ["Nontemporal"] : f32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -94,43 +94,43 @@ func @load_nontemporal() {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @store
-func @store(%arg0 : f32) -> () {
+spv.func @store(%arg0 : f32) "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.store %{{.*}}, %{{.*}} : !llvm.ptr<float>
   spv.Store "Function" %0, %arg0 : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @store_composite
-func @store_composite(%arg0 : !spv.struct<f64>) -> () {
+spv.func @store_composite(%arg0 : !spv.struct<f64>) "None" {
   %0 = spv.Variable : !spv.ptr<!spv.struct<f64>, Function>
   // CHECK: llvm.store %{{.*}}, %{{.*}} : !llvm.ptr<struct<packed (double)>>
   spv.Store "Function" %0, %arg0 : !spv.struct<f64>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @store_with_alignment
-func @store_with_alignment(%arg0 : f32) -> () {
+spv.func @store_with_alignment(%arg0 : f32) "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.store %{{.*}}, %{{.*}} {alignment = 4 : i64} : !llvm.ptr<float>
   spv.Store "Function" %0, %arg0 ["Aligned", 4] : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @store_volatile
-func @store_volatile(%arg0 : f32) -> () {
+spv.func @store_volatile(%arg0 : f32) "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.store volatile %{{.*}}, %{{.*}} : !llvm.ptr<float>
   spv.Store "Function" %0, %arg0 ["Volatile"] : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @store_nontemporal
-func @store_nontemporal(%arg0 : f32) -> () {
+spv.func @store_nontemporal(%arg0 : f32) "None" {
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: llvm.store %{{.*}}, %{{.*}} {nontemporal} : !llvm.ptr<float>
   spv.Store "Function" %0, %arg0 ["Nontemporal"] : f32
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -138,50 +138,50 @@ func @store_nontemporal(%arg0 : f32) -> () {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @variable_scalar
-func @variable_scalar() {
+spv.func @variable_scalar() "None" {
   // CHECK: %[[SIZE1:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   // CHECK: llvm.alloca %[[SIZE1]] x !llvm.float : (!llvm.i32) -> !llvm.ptr<float>
   %0 = spv.Variable : !spv.ptr<f32, Function>
   // CHECK: %[[SIZE2:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   // CHECK: llvm.alloca %[[SIZE2]] x !llvm.i8 : (!llvm.i32) -> !llvm.ptr<i8>
   %1 = spv.Variable : !spv.ptr<i8, Function>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @variable_scalar_with_initialization
-func @variable_scalar_with_initialization() {
+spv.func @variable_scalar_with_initialization() "None" {
   // CHECK: %[[VALUE:.*]] = llvm.mlir.constant(0 : i64) : !llvm.i64
   // CHECK: %[[SIZE:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   // CHECK: %[[ALLOCATED:.*]] = llvm.alloca %[[SIZE]] x !llvm.i64 : (!llvm.i32) -> !llvm.ptr<i64>
   // CHECK: llvm.store %[[VALUE]], %[[ALLOCATED]] : !llvm.ptr<i64>
   %c = spv.constant 0 : i64
   %0 = spv.Variable init(%c) : !spv.ptr<i64, Function>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @variable_vector
-func @variable_vector() {
+spv.func @variable_vector() "None" {
   // CHECK: %[[SIZE:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   // CHECK: llvm.alloca  %[[SIZE]] x !llvm.vec<3 x float> : (!llvm.i32) -> !llvm.ptr<vec<3 x float>>
   %0 = spv.Variable : !spv.ptr<vector<3xf32>, Function>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @variable_vector_with_initialization
-func @variable_vector_with_initialization() {
+spv.func @variable_vector_with_initialization() "None" {
   // CHECK: %[[VALUE:.*]] = llvm.mlir.constant(dense<false> : vector<3xi1>) : !llvm.vec<3 x i1>
   // CHECK: %[[SIZE:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   // CHECK: %[[ALLOCATED:.*]] = llvm.alloca %[[SIZE]] x !llvm.vec<3 x i1> : (!llvm.i32) -> !llvm.ptr<vec<3 x i1>>
   // CHECK: llvm.store %[[VALUE]], %[[ALLOCATED]] : !llvm.ptr<vec<3 x i1>>
   %c = spv.constant dense<false> : vector<3xi1>
   %0 = spv.Variable init(%c) : !spv.ptr<vector<3xi1>, Function>
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @variable_array
-func @variable_array() {
+spv.func @variable_array() "None" {
   // CHECK: %[[SIZE:.*]] = llvm.mlir.constant(1 : i32) : !llvm.i32
   // CHECK: llvm.alloca %[[SIZE]] x !llvm.array<10 x i32> : (!llvm.i32) -> !llvm.ptr<array<10 x i32>>
   %0 = spv.Variable : !spv.ptr<!spv.array<10 x i32>, Function>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
index d54b91668cd97..e114cea6c96fa 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
@@ -5,19 +5,19 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @select_scalar
-func @select_scalar(%arg0: i1, %arg1: vector<3xi32>, %arg2: f32) {
+spv.func @select_scalar(%arg0: i1, %arg1: vector<3xi32>, %arg2: f32) "None" {
   // CHECK: llvm.select %{{.*}}, %{{.*}}, %{{.*}} : !llvm.i1, !llvm.vec<3 x i32>
   %0 = spv.Select %arg0, %arg1, %arg1 : i1, vector<3xi32>
   // CHECK: llvm.select %{{.*}}, %{{.*}}, %{{.*}} : !llvm.i1, !llvm.float
   %1 = spv.Select %arg0, %arg2, %arg2 : i1, f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @select_vector
-func @select_vector(%arg0: vector<2xi1>, %arg1: vector<2xi32>) {
+spv.func @select_vector(%arg0: vector<2xi1>, %arg1: vector<2xi32>) "None" {
   // CHECK: llvm.select %{{.*}}, %{{.*}}, %{{.*}} : !llvm.vec<2 x i1>, !llvm.vec<2 x i32>
   %0 = spv.Select %arg0, %arg1, %arg1 : vector<2xi1>, vector<2xi32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -30,7 +30,7 @@ func @select_vector(%arg0: vector<2xi1>, %arg1: vector<2xi32>) {
 // CHECK-NEXT:   }
 // CHECK-NEXT: }
 spv.module Logical GLSL450 {
-  spv.func @empty() -> () "None" {
+  spv.func @empty() "None" {
     spv.Return
   }
   spv.EntryPoint "GLCompute" @empty
@@ -42,15 +42,15 @@ spv.module Logical GLSL450 {
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @undef_scalar
-func @undef_scalar() {
+spv.func @undef_scalar() "None" {
   // CHECK: llvm.mlir.undef : !llvm.float
   %0 = spv.undef : f32
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @undef_vector
-func @undef_vector() {
+spv.func @undef_vector() "None" {
   // CHECK: llvm.mlir.undef : !llvm.vec<2 x i32>
   %0 = spv.undef : vector<2xi32>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/shift-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/shift-ops-to-llvm.mlir
index 52df231e718e4..e238446112589 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/shift-ops-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/shift-ops-to-llvm.mlir
@@ -5,7 +5,7 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @shift_right_arithmetic_scalar
-func @shift_right_arithmetic_scalar(%arg0: i32, %arg1: si32, %arg2 : i16, %arg3 : ui16) {
+spv.func @shift_right_arithmetic_scalar(%arg0: i32, %arg1: si32, %arg2 : i16, %arg3 : ui16) "None" {
   // CHECK: llvm.ashr %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.ShiftRightArithmetic %arg0, %arg0 : i32, i32
 
@@ -19,11 +19,11 @@ func @shift_right_arithmetic_scalar(%arg0: i32, %arg1: si32, %arg2 : i16, %arg3
   // CHECK: %[[ZEXT:.*]] = llvm.zext %{{.*}} : !llvm.i16 to !llvm.i32
   // CHECK: llvm.ashr %{{.*}}, %[[ZEXT]] : !llvm.i32
   %3 = spv.ShiftRightArithmetic %arg0, %arg3 : i32, ui16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @shift_right_arithmetic_vector
-func @shift_right_arithmetic_vector(%arg0: vector<4xi64>, %arg1: vector<4xui64>, %arg2: vector<4xi32>, %arg3: vector<4xui32>) {
+spv.func @shift_right_arithmetic_vector(%arg0: vector<4xi64>, %arg1: vector<4xui64>, %arg2: vector<4xi32>, %arg3: vector<4xui32>) "None" {
   // CHECK: llvm.ashr %{{.*}}, %{{.*}} : !llvm.vec<4 x i64>
   %0 = spv.ShiftRightArithmetic %arg0, %arg0 : vector<4xi64>, vector<4xi64>
 
@@ -37,7 +37,7 @@ func @shift_right_arithmetic_vector(%arg0: vector<4xi64>, %arg1: vector<4xui64>,
   // CHECK: %[[ZEXT:.*]] = llvm.zext %{{.*}} : !llvm.vec<4 x i32> to !llvm.vec<4 x i64>
   // CHECK: llvm.ashr %{{.*}}, %[[ZEXT]] : !llvm.vec<4 x i64>
   %3 = spv.ShiftRightArithmetic %arg0, %arg3 : vector<4xi64>, vector<4xui32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -45,7 +45,7 @@ func @shift_right_arithmetic_vector(%arg0: vector<4xi64>, %arg1: vector<4xui64>,
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @shift_right_logical_scalar
-func @shift_right_logical_scalar(%arg0: i32, %arg1: si32, %arg2 : si16, %arg3 : ui16) {
+spv.func @shift_right_logical_scalar(%arg0: i32, %arg1: si32, %arg2 : si16, %arg3 : ui16) "None" {
   // CHECK: llvm.lshr %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.ShiftRightLogical %arg0, %arg0 : i32, i32
 
@@ -59,11 +59,11 @@ func @shift_right_logical_scalar(%arg0: i32, %arg1: si32, %arg2 : si16, %arg3 :
   // CHECK: %[[ZEXT:.*]] = llvm.zext %{{.*}} : !llvm.i16 to !llvm.i32
   // CHECK: llvm.lshr %{{.*}}, %[[ZEXT]] : !llvm.i32
   %3 = spv.ShiftRightLogical %arg0, %arg3 : i32, ui16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @shift_right_logical_vector
-func @shift_right_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %arg2: vector<4xi32>, %arg3: vector<4xui32>) {
+spv.func @shift_right_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %arg2: vector<4xi32>, %arg3: vector<4xui32>) "None" {
   // CHECK: llvm.lshr %{{.*}}, %{{.*}} : !llvm.vec<4 x i64>
   %0 = spv.ShiftRightLogical %arg0, %arg0 : vector<4xi64>, vector<4xi64>
 
@@ -77,7 +77,7 @@ func @shift_right_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %a
   // CHECK: %[[ZEXT:.*]] = llvm.zext %{{.*}} : !llvm.vec<4 x i32> to !llvm.vec<4 x i64>
   // CHECK: llvm.lshr %{{.*}}, %[[ZEXT]] : !llvm.vec<4 x i64>
   %3 = spv.ShiftRightLogical %arg0, %arg3 : vector<4xi64>, vector<4xui32>
-  return
+  spv.Return
 }
 
 //===----------------------------------------------------------------------===//
@@ -85,7 +85,7 @@ func @shift_right_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %a
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @shift_left_logical_scalar
-func @shift_left_logical_scalar(%arg0: i32, %arg1: si32, %arg2 : i16, %arg3 : ui16) {
+spv.func @shift_left_logical_scalar(%arg0: i32, %arg1: si32, %arg2 : i16, %arg3 : ui16) "None" {
   // CHECK: llvm.shl %{{.*}}, %{{.*}} : !llvm.i32
   %0 = spv.ShiftLeftLogical %arg0, %arg0 : i32, i32
 
@@ -99,11 +99,11 @@ func @shift_left_logical_scalar(%arg0: i32, %arg1: si32, %arg2 : i16, %arg3 : ui
   // CHECK: %[[ZEXT:.*]] = llvm.zext %{{.*}} : !llvm.i16 to !llvm.i32
   // CHECK: llvm.shl %{{.*}}, %[[ZEXT]] : !llvm.i32
   %3 = spv.ShiftLeftLogical %arg0, %arg3 : i32, ui16
-  return
+  spv.Return
 }
 
 // CHECK-LABEL: @shift_left_logical_vector
-func @shift_left_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %arg2: vector<4xi32>, %arg3: vector<4xui32>) {
+spv.func @shift_left_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %arg2: vector<4xi32>, %arg3: vector<4xui32>) "None" {
   // CHECK: llvm.shl %{{.*}}, %{{.*}} : !llvm.vec<4 x i64>
   %0 = spv.ShiftLeftLogical %arg0, %arg0 : vector<4xi64>, vector<4xi64>
 
@@ -117,5 +117,5 @@ func @shift_left_logical_vector(%arg0: vector<4xi64>, %arg1: vector<4xsi64>, %ar
   // CHECK: %[[ZEXT:.*]] = llvm.zext %{{.*}} : !llvm.vec<4 x i32> to !llvm.vec<4 x i64>
   // CHECK: llvm.shl %{{.*}}, %[[ZEXT]] : !llvm.vec<4 x i64>
   %3 = spv.ShiftLeftLogical %arg0, %arg3 : vector<4xi64>, vector<4xui32>
-  return
+  spv.Return
 }

diff  --git a/mlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm.mlir
index 454b5b314f88a..d14c8de49555d 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/spirv-types-to-llvm.mlir
@@ -5,40 +5,40 @@
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @array(!llvm.array<16 x float>, !llvm.array<32 x vec<4 x float>>)
-func @array(!spv.array<16 x f32>, !spv.array< 32 x vector<4xf32> >) -> ()
+spv.func @array(!spv.array<16 x f32>, !spv.array< 32 x vector<4xf32> >) "None"
 
 // CHECK-LABEL: @array_with_natural_stride(!llvm.array<16 x float>)
-func @array_with_natural_stride(!spv.array<16 x f32, stride=4>) -> ()
+spv.func @array_with_natural_stride(!spv.array<16 x f32, stride=4>) "None"
 
 //===----------------------------------------------------------------------===//
 // Pointer type
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @pointer_scalar(!llvm.ptr<i1>, !llvm.ptr<float>)
-func @pointer_scalar(!spv.ptr<i1, Uniform>, !spv.ptr<f32, Private>) -> ()
+spv.func @pointer_scalar(!spv.ptr<i1, Uniform>, !spv.ptr<f32, Private>) "None"
 
 // CHECK-LABEL: @pointer_vector(!llvm.ptr<vec<4 x i32>>)
-func @pointer_vector(!spv.ptr<vector<4xi32>, Function>) -> ()
+spv.func @pointer_vector(!spv.ptr<vector<4xi32>, Function>) "None"
 
 //===----------------------------------------------------------------------===//
 // Runtime array type
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @runtime_array_vector(!llvm.array<0 x vec<4 x float>>)
-func @runtime_array_vector(!spv.rtarray< vector<4xf32> >) -> ()
+spv.func @runtime_array_vector(!spv.rtarray< vector<4xf32> >) "None"
 
 // CHECK-LABEL: @runtime_array_scalar(!llvm.array<0 x float>)
-func @runtime_array_scalar(!spv.rtarray<f32>) -> ()
+spv.func @runtime_array_scalar(!spv.rtarray<f32>) "None"
 
 //===----------------------------------------------------------------------===//
 // Struct type
 //===----------------------------------------------------------------------===//
 
 // CHECK-LABEL: @struct(!llvm.struct<packed (double)>)
-func @struct(!spv.struct<f64>) -> ()
+spv.func @struct(!spv.struct<f64>) "None"
 
 // CHECK-LABEL: @struct_nested(!llvm.struct<packed (i32, struct<packed (i64, i32)>)>)
-func @struct_nested(!spv.struct<i32, !spv.struct<i64, i32>>)
+spv.func @struct_nested(!spv.struct<i32, !spv.struct<i64, i32>>) "None"
 
 // CHECK-LABEL: @struct_with_natural_offset(!llvm.struct<(i8, i32)>)
-func @struct_with_natural_offset(!spv.struct<i8[0], i32[4]>) -> ()
+spv.func @struct_with_natural_offset(!spv.struct<i8[0], i32[4]>) "None"


        


More information about the Mlir-commits mailing list