[Mlir-commits] [mlir] [mlir][spirv] Use `verifySymbolUses` for `spirv.FunctionCall`. (PR #159399)
    Jakub Kuderski 
    llvmlistbot at llvm.org
       
    Thu Sep 18 07:02:08 PDT 2025
    
    
  
================
@@ -262,6 +262,35 @@ spirv.module Logical GLSL450 {
 
 // -----
 
+"builtin.module"() ({
+  "spirv.module"() <{
+    addressing_model = #spirv.addressing_model<Logical>,
+    memory_model = #spirv.memory_model<GLSL450>
+  }> ({
+    "spirv.func"() <{
+      function_control = #spirv.function_control<None>,
+      function_type = (f32) -> f32,
+      sym_name = "bar"
+    }> ({
+    ^bb0(%arg0: f32):
+      %0 = "spirv.FunctionCall"(%arg0) <{callee = @foo}> : (f32) -> f32
+      "spirv.ReturnValue"(%0) : (f32) -> ()
+    }) : () -> ()
+    // expected-error @+1 {{requires attribute 'function_type'}}
+    "spirv.func"() <{
+      function_control = #spirv.function_control<None>,
+      message = "2nd parent",
+      sym_name = "foo"
+      // This is invalid MLIR because function_type is missing from spirv.func
----------------
kuhar wrote:
```suggestion
      // This is invalid MLIR because function_type is missing from spirv.func.
```
https://github.com/llvm/llvm-project/pull/159399
    
    
More information about the Mlir-commits
mailing list