<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/97896>97896</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
undefined reference to `__truncsfbf2' when compiling ir with clang
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DigOrDog
</td>
</tr>
</table>
<pre>
# Description
When I was compiling this IR with clang, I encountered this error. It seems to be right from a syntactic perspective, which is quite strange. From [half-precision-floating-point](https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point) document, _bf16 is supported on X86 (when SSE2 is available)(For X86, SSE2 is available on 64-bit and all recent 32-bit processors.)
```
define i64 @f(bfloat %CastFPTrunc, ptr %x) {
BB:
store bfloat %CastFPTrunc, ptr %x, align 2
ret i64 0
}
define i32 @main() {
entry:
ret i32 0
}
```
https://godbolt.org/z/MbcMvcWe6
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU02L5DYQ_TXqS9GNu_x98GFneg0DWRKygc1tkOSyrSBLjlTu2cmvD3J3MpkNCQvGLouqV6-e6skYzeSIOlE-iPJykBvPPnQXM_0YLn46KD-8dgJzuFDUwaxsvBPZRWQfvszk4AleZATtl9VY4ybg2UR4-hleDM-grXSTwEd4AnLab44p0HDLoRB8OMETQyRaIrAHRRDMNDOMwS8gIb46lpqNhpVCXEmzuVKCe5mNnsFE-H0zTBA5SDfRCfpUJ8qHWdrxuAbSJhrvjqP1ko2bjqs3jkV5EdjMzGsU-QeBvcB-J3qy9rqcfJgE9oPXUWD_g3TTJif6-JXJJax4mnmxAvP_b4EtDF5vC6X4EZ7VeK4S37itqw9MA3gHvzYVCGxekoyfP3_ElCCv0lipLAlsBTa9DyktYfwrI0FUxVEZBukGkNZCIE2OIcf9dA1eU4w-xFNC2-9MVNn92X8HGo0jMFUBoshGgY3aJwGB5aOM3P_0S9icTv1XDun0a5pN1A-3-oeHJOEeAkT2geA7AB5BWjM5wL8qA_HO4c5K1Jd78I5kjonkIo0T2LyjQY7D6xuTd7A5_gfsN1Lc3u_XYvKD8pbvO_GHwP6T0p-u-gtVh6HLhzZv5YG6c40Z1pify8Pc6XpoZaYLSaodz5LaTFcKm7IYdV5IPRxMhxkWWZ1V5xzLc3kaFJ1VrVRel40uBxRFRos09u99PJgYN-raummrg5WKbNzding3GCbjhi7lH9U2RVFk1kSObwhs2FK3uZuWAwQaKZDTlHwnquz5mdM9xVGNKLCGfSnfXG3CPwx92ILtvhHK8Lypk_aLwD41vX-Oa_C_kWaB_T5D8tRtjGuHfwYAAP__Du1m0w">