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

    <tr>
        <th>Summary</th>
        <td>
            LLVM 19.1.0 clang-cl x86 target, /fp:fast, acosf breaks link
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          Nick-Kooij
      </td>
    </tr>
</table>

<pre>
    The following program prints π and exits:

````
#include <cmath>
#include <cstdio>

int main( int argc, char** argv ) {
    printf( "%f\n", acosf( 0.0f ) * 2 );
    return 0;
}
````

Compiling the above single-module program with **LLVM 19.1.0** through the **clang-cl** driver, targeting **x86**, with the **fast math (/fp:fast)** switch fails to link:

````
lld-link : error : undefined symbol: _acosf
````

## Steps to reproduce:
* Obtained [LLVM-19.1.0-win64.exe](https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-win64.exe) from the official Assests.
* Install on **Windows 11** with **Visual Studio 2022 17.11.4**
* Must build a *x86* target
  * x64 targets link and run properly
* Must use the /fp:fast fast math mode compiler switch

This issue was introduced with **LLVM 19.1.0,** and is not a result of changes to Visual Studio.  Prior versions, such as **LLVM 18.1.8**, link properly, using the aforementioned version Visual Studio.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2P2zYQ_TXUZWBBoixLPujgeGugaNIWSJAeC4ocScxSpMEPe_ffF6RkezdIWhQwZGKGnI837w1zTo4asSP1B1I_ZSz4ydjud8mfN78ZI79lvRGv3ZcJYTBKmavUI5ytGS2b4Wyl9g7I8UTaApgWgC_SO1IdSPFEitt3Vzx-i4VWUnMVBAKpjnxmfiLVLz_0OS-keTjTV2oPM5Oa0BbimdmRE3oEPjFL6IHQQzRdgNA9kObD8ggAlnqH-IxQSmg9kPqo0_EIjBuXXEVeDMtTegAaT6R6E8OiD1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