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

    <tr>
        <th>Summary</th>
        <td>
            Assertion "Narrow integer argument must have a valid extension type." failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    @sum seems to have extension attributes missing for the returned value as well as for both of the arguments:

```
Testing: 
FAIL: LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/7/21 (1 of 79162)
******************** TEST 'LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/7/21' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/ijonpan/llvm-project/build/unittests/ExecutionEngine/Orc/./OrcJITTests-LLVM-Unit-344154-7-21.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=21 GTEST_SHARD_INDEX=7 /home/ijonpan/llvm-
project/build/unittests/ExecutionEngine/Orc/./OrcJITTests
--

Note: This is test shard 8 of 21.
[==========] Running 8 tests from 7 test suites.
[----------] Global test environment set-up.
[----------] 2 tests from CoreAPIsStandardTest
[ RUN      ] CoreAPIsStandardTest.RemoveSymbolsTest
[       OK ] CoreAPIsStandardTest.RemoveSymbolsTest (0 ms)
[ RUN      ] CoreAPIsStandardTest.GeneratorTest
[       OK ] CoreAPIsStandardTest.GeneratorTest (0 ms)
[----------] 2 tests from CoreAPIsStandardTest (0 ms total)

[----------] 1 test from ExecutorAddrTest
[ RUN      ] ExecutorAddrTest.PtrConversion
[       OK ] ExecutorAddrTest.PtrConversion (0 ms)
[----------] 1 test from ExecutorAddrTest (0 ms total)

[----------] 1 test from MapperJITLinkMemoryManagerTest
[ RUN      ] MapperJITLinkMemoryManagerTest.Coalescing
[       OK ] MapperJITLinkMemoryManagerTest.Coalescing (0 ms)
[----------] 1 test from MapperJITLinkMemoryManagerTest (0 ms total)

[----------] 1 test from OrcCAPITestBase
[ RUN      ] OrcCAPITestBase.EnableDebugSupport
ERROR: Missing extension attribute of returned value from function:
i32 @sum(i32, i32)

```
@lhames @nikic 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVlFTqzoX_TXpy54yEFopDzygFE_9qnXa-s19cwLsQjyQdJJQj__-TgDr0au96rlMhhS698raKyQrTGteCsSITM_JNBmx1lRSRVdS3GothTfKZPEUkYmr2wY0YqPBSKjYAQF_GRSaSwHMGMWz1qCGhmvNRQk7qcBUCApNqwQWcGB1i8A0PGJd295GZNJUIHddJFNl26AwmvgxcRPiPt_P3KF1j1vUhouS-DH0L9J4sbRPy-X_r8d3ghuwAH4M81-Yt4ZLMRclF0houlI5oanT_7pabC2WJjQNCE2pB4TOPMsmCL0zSmg4jE-_32A732yB0OCPyREagK10nsCfEOpL2uSK7w2hM10xVdhKnyUfj_v-0hK_X91tb--2xE8etBQ2hqaVbCxZ_iDFnglC07o-NOO9kg-YG0LTrOV1QWjaCm7MUMEnax0fRRr7k4k3nYyDMfUcOzb0fDY_7tJ0OSd-4g5vtqttvLzf_IjXyYb4CfWOkfE6uV_cJPO_iJ8E8CHzvtz_hP9rBfv7jTRop3tbcQ1cg4WETnWY2U-Nes4QPj0nfnKqTRNYt0LYxTXrcDTslGwgGEBbblC_oI2Pl828rGXG6j4SxYErKexaA41m3O4_yqK_j3MhFca3C70xTBRMFbbmYx6s726gu2zee6HOGht5wM1Tk8lav07ur9X_vpBsF6sLjX5Zpp8icYkCFTNSfZXAq8T3Bv-ics8QYKRh9QvQ-3BeP3MdWv81ShUXhToxB2_DnFujLqQ4oLJb9geln07697JP8fx-xddsv0d1tdguufh5jY1UT9dMsBJP1X86ybmQrEadWyd5X4pP539NldOw39dopfKL-HZhQc6Zxg9EeRPlzAXLakwwa8tNu99LNag5X69Xa7tvXQ92_o7X2-3rjbt3THatyO1mefQU7lPo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