<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54317>54317</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
IR Outliner should not add optsize to optnone functions (or outline from them at all)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ornata
</td>
</tr>
</table>
<pre>
In the below example, we enable the IR outliner on two `optnone` functions:
https://godbolt.org/z/8498MaYEj
```
Attributes 'optsize and optnone' are incompatible!
void (i32*)* @outlined_ir_func_0
LLVM ERROR: Broken module found, compilation aborted!
```
If a function is marked as `optnone`, it should not be outlined from.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUstu4zAM_Br7Qmxgy47tHHxoty0QoEWBHBbYUyBFcqxWFgM9mm6_fmk17guQKdIEyeGMBMp__dZCGBUIZfAM6pVPJ6My9hvOCpTlwqiU3u4AYzDaKgdIFWeErCnwFCxaRR4M0R6CRuuz6iorbrLiYscQTukfu6NzRCnQhBW6I0Vv9HX1pnvgf2-fvhZRw8tJ4VUITosYlIeMtTTU6zcF3EpYALAWuFOg7QGnEw9azDuU79UvqCXVdbpiGSMcG7KQ1cVlH7nXbj-j31-m3d__eYDb3e5xR7Dh2uGzsjChjETFgNHKmZ15jjZ83hi4QBeU_Bj4A_273Q7AP0gC7WHi7llJ4P47kXNzHcCPGI0Ei4GUWaiXMDicVrnsK7mpNjwPOhjVkzaPizZf6rhM_CSuAi5UfQo1c4Ju6Z1az1JPwKnWGCIqj870PwTUYYxiRetTYMzLcv06OXxSh0Ch9j4qT866rso2H_uC1e1GlEMzsENTD11ZclYPg5Rd1YhD0-aG0-vzfba-zhiz6gypBfnZ-ibXPSsYK6qyKEpGZ8XKumPtui1l1zYUkJRq4tqsZhzzy8pdnyCJePSUNNoH_5nk3uujVSqNo_48hhFdj87ywPM0uU_I_wNf-_1p">