<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94949>94949</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`target_clone` attribute blocks function inlining
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:codegen,
missed-optimization
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dtcxzyw
</td>
</tr>
</table>
<pre>
See the following case: https://godbolt.org/z/TqnvKcKWK
```
__attribute__((target_clones("default,sse4.2,avx2")))
int callee(void) { return 1; }
__attribute__((target_clones("default,sse4.2,avx2")))
int caller(void) {
return callee();
}
```
`callee` should be inlined into caller because they share the same target_clone attribute.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0UjuPnDAQ_jVDYx0yY2ChcLF3K5orEynlytiz4MTYF2z2Hr8-giX3SB9pJITHnu8xn4rRDp5IQnUP1SlTSxrDLE3SL2-vz1kfzKv8RsTSSOwSnAvP1g9Mq0ggjmxM6SmCOAJ2gN0QTB9cysM8AHZvgN333_76qB9_PAI_AT9Czffafs9nldJs-yXR-QzYADZJzQOls3bBU9yO0NBFLS4BPsRIZY6AD-r6goAI2O61jbM-Ma2cIwJsrsEawJbB4Z7NlJbZswLEPYPDaefyXynMXyncuoyxv1zeea5Pxd7_4PbVJ6j5fr_mLI5hcYb1xKx31pNh1qewo7KetFritq5XFkc13zYX1UTsszD2Lju_YWRGCtOKVmUki0PR8EKIArNRXqoD1j1WRVs1pm-4IFXrw4UUNiWRKTMrkWPJ64LztqoKzDnWSglRY4OVqJWGktOkrMudu05rODIb40KyLduyzZzqycUtfojaKT-AOOpgaCC_GfwAiJONkcxdeEp2sm8q2bD1qlM2y3XqXb8MEUrubEzxAyfZ5EhCzT9LX018V896F_SvyC6L1-vUm6nWD9kyO_lPvG0alz7XYQLsVoz9c_c0h5-kE2C3CYuA3U3bVeKfAAAA__9Jvwus">