<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/115564>115564</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Missing extension attributes in tests
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          JonPsson1
      </td>
    </tr>
</table>

<pre>
    As argument extensions are needed for correctness, I have been working on going through the code base for cases where they are missing. In mlir, I have now found a few, that I would need help with. In particular, I don't know where these functions are emitted, or how to add the proper Attributes (CreateRuntimeFunction? /.td file?). These are the tests that fail, with the problematic function printed as well:

```
FAIL: MLIR-Unit :: ExecutionEngine/./MLIRExecutionEngineTests/6/12 (11 of 2540)
******************** TEST 'MLIR-Unit :: ExecutionEngine/./MLIRExecutionEngineTests/6/12' FAILED ********************
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MLIRExecutionEngine
[ RUN      ] MLIRExecutionEngine.AddInteger
ERROR: Missing extension attribute of returned value from function:  // and arg
i32 @foo(i32)
```

```
FAIL: MLIR :: CAPI/execution_engine.c (12 of 2540)
******************** TEST 'MLIR :: CAPI/execution_engine.c' FAILED ********************
Running test 'testSimpleExecution'
ERROR: Missing extension attribute of returned value from function:  // and arg
range(i32 0, -1) i32 @add(i32)
```

```
FAIL: MLIR :: mlir-cpu-runner/simple.mlir (13 of 2540)
******************** TEST 'MLIR :: mlir-cpu-runner/simple.mlir' FAILED ********************
# | ERROR: Missing extension attribute of returned value from function:
# | i32 @int32_main()
```

```
FAIL: MLIR-Unit :: ExecutionEngine/./MLIRExecutionEngineTests/11/12 (15 of 2540)
******************** TEST 'MLIR-Unit :: ExecutionEngine/./MLIRExecutionEngineTests/11/12' FAILED ********************
ERROR: Missing extension attribute of passed value in call to function:
Callee:  void @_mlir_ciface_callback(ptr, i32)
Caller:  void @callback(ptr, ptr, i64, i64, i64, i64, i64, i32)
```
Thanks for any help here. Adding people I find in the logs: 
@shahidact @dcaballe @banach-space @ienkovich @tblah @paulwalker-arm @brod4910 @CoTinker @Groverkss 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVt-PmzgQ_mucl1EiMGFJHnhId5cqp95dlabPK2MP4IuxkW2S9r8_2STZ9vpjT216OoSCiT0z3_j7PAxzTrYasST5K5I_zNjoO2PL34x-65zR6aw24mO5ccBsO_aoPeAHj9pJo8N_CBpRoIDGWODGWuReo3OE3sMWOnZEqBE1nIw9SN2C0dCaMPCdNWPbge8QuBEINXM4eWEOHZw6tBhmP8YovXRO6nYBWw29kvYT_9qcoDGjFsCgwVOY8R3zsIWTGZWIAKFDNcBJ-i56GJj1ko-Knf0IowktPByCr2vkgGfU3F9TxV56jyLYGAudOYE3wISISQzWDGhh472V9ejRAaGre4vM427UXvZYnZ2RrAJCq4UX0EiFJKsIXS9gHyOyKTZ4dN5NiTRMqhAzwL-EqhX2zEt-RQiDldqjAObghEqRbEOSB5Jcfu-S8x1fq832Dck28Pub7W7-XksPYX22gccPyMfg71G3UmOASWgVlv1jZh_wEVrdEVqlNOSapmAaoPkyIXR9jkp__Ib947s9EFrcCiOhBYS8Hx_gZ3CdM8tfkezhe3f-ALtR66D1NLIJjTX9ZexG6XFx9TW_XsHutTI1U9NC1EdpjY4nz6Gfj8O3rD6N8pXNuFrB7v0fEK9g9ZWVi40QW-2xRTsZPe52f-6iXKZT-FwCgF3kHri36EerUcCRqREnJM1V9BsIqie0AhbOqm0n5zKjQJZJYwyhK5nRZ_F8LtkXdXyRx_3m7ZbQCi9JPeGUFY8ipb9OpC8CuKkCL-KKpIfqhc6_k_2g8EonocV_QKBlusWJO0hCnZqnhK7hzCsT4ka8hrI_58M4t6PWaAmtXEx3ESYit9mv5_a7IG5bYWgGpLiHG3H3udMzOVL7jD71TGpCVz9M0M8V5zR9_oLk_9cvyBnkTQn-t8QOzLkrrVIDZ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