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

    <tr>
        <th>Summary</th>
        <td>
            clang-cl: always_inline function '_mm_crc32_u64' requires target feature 'crc32'
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          Neumann-A
      </td>
    </tr>
</table>

<pre>
    ```
clang version 14.0.6
Target: x86_64-pc-windows-msvc
```

probably related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265027

While compiling libpq with clang-cl instead of cl I see:
```
         src/port/pg_crc32c_sse42.c(38,18): error : always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'pg_comp_crc32c_sse42' that is compiled without support for 'crc32' [E:\vcpkg_folders\qt6-update\buildtrees\libpq\x64-windows-rel\libpgport.vcxproj]
         src/port/pg_crc32c_sse42.c(45,9): error : always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'pg_comp_crc32c_sse42' that is compiled without support for 'crc32' [E:\vcpkg_folders\qt6-update\buildtrees\libpq\x64-windows-rel\libpgport.vcxproj]
         src/port/pg_crc32c_sse42.c(64,9): error : always_inline function '_mm_crc32_u8' requires target feature 'crc32', but would be inlined into function 'pg_comp_crc32c_sse42' that is compiled without support for 'crc32' [E:\vcpkg_folders\qt6-update\buildtrees\libpq\x64-windows-rel\libpgport.vcxproj]

```
Running the build with cl works as expected (Simply switched the toolset from Clang-Cl back to vc143). So I assume there is something wrong how llvm selects the target architecture. (especially since it seems that I am not the only one and it started happening with llvm 14(?) ) 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztVU2PpDYQ_TVwKTWizUfTBw6zMxkplxyykXJsGduAdwxmbNM9k1-fZ5jR7kR7SFY5bovGH2WqXr0qHp2Vr21S529X_pDkd8LweaCrcl7bmY5llmf1bvmDu0GFpLijl6a-1OVhEYebnqW9-cPkr2I_9Q93-31xtuOdeSWnDA9KRidjCIvHJGGPuLp18FnvlOq8zKwb9q2_tDEcUz_a2wXrTAw6KR41HDywusrZ6dsof47aKBJ2WrTRSMLobnmmmw4jbVkdhCE9-6C4JNtjj34lr1TE8D3o9P7zTgDDYl2Iw3ARThRMXLxXJctgaoomYfdH3M4xMeWcdRRn3Nz4q7_oGXAU9essQiQ1YafLNO1uLmtdYg1inlftlKewsUy94mF1Kp7dzmFEDOrWQDe7Gkmdot2vxBjsB-8RI1j4ADQGCSMPpP0bRXgycmPh0q9LTI_6CPxrREqqT79Eeqr7q1iehktvjURnYP0c6sO6SBQTi27VRgYUL1o21jG-oEPe2wNlf7MMMU52FS9oiS9J9fBfqS4r0HD-Mab3nH4y_e-Yjn35o0w3P4n-rqT8vs5zVKYwKtoivKsTGHBPnrgn9bIoAYkE6OaznhaIpschMWIrPhasNT6y6exE95us3RvquHiCia7iWBaoWUafLdSNe79OKj4H3sGSt5MKY0RwcxZ3yCoZc50ggwZR_R5hLxd3YtQBu6hZFtEoD2Sam4hIzwIOQ5TPye9FQLSJZhs2H3bGKYsG4bPczsFpTGrky6I2CrbEt9hHNFoDVQdsiv9Utce6apqiKE9FKttCnoszT4MORrXvQv7_y2u6OtN-_CgNwLh2GXoLi4j1bTjESoMZLDUYRo-wx6o-MZaOrex6LjumaiZLfizYWbKma9ip6c-NlFWfGt4p41v0YcLYrG60ucAcrZPqluWM5SdWH495WbCsFlLmUtSnqoBT1idlriauTRZxxA9l6toNUvyAwmi0D_6rEQ2gh1mpLRz88xVvh2t_U-vE5_lwl27B2w383-l4oBU">