<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91076>91076</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Build failure with -march=native on Intel Core i5 13600KF (error in backend: ZMM registers are not supported without EVEX512)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kostadinsh
</td>
</tr>
</table>
<pre>
LLVM fails to build when using `-march=native` on an Intel Core i5 13600KF, reproducible both on master at https://github.com/llvm/llvm-project/commit/cb015b9ec9446b3a1303980c095fa442d5e46fbf and version 18.1.5
```
FAILED: lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o
/usr/lib/llvm/19/bin/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/mnt/portage/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/mnt/portage/portage/sys-devel/llvm-19.0.0.9999/work/llvm/lib/Support/BLAKE3 -I/mnt/portage/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/include -I/mnt/portage/portage/sys-devel/llvm-19.0.0.9999/work/llvm/include -DNDEBUG -march=native -O2 -pipe -fPIC -mavx512vl -MD -MT lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o -MF lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o.d -o lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o -c /mnt/portage/portage/sys-devel/llvm-19.0.0.9999/work/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
clang -cc1as: fatal error: error in backend: ZMM registers are not supported without EVEX512
```
Output from `echo | clang -E - -march=native -###
```
clang version 19.0.0gitcb015b9e
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/19/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
(in-process)
"/usr/lib/llvm/19/bin/clang-19" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "alderlake" "-target-feature" "+prfchw" "-target-feature" "-cldemote" "-target-feature" "+avx" "-target-feature" "+aes" "-target-feature" "+sahf" "-target-feature" "+pclmul" "-target-feature" "-xop" "-target-feature" "+crc32" "-target-feature" "+xsaves" "-target-feature" "-avx512fp16" "-target-feature" "-usermsr" "-target-feature" "-sm4" "-target-feature" "-egpr" "-target-feature" "+sse4.1" "-target-feature" "-avx512ifma" "-target-feature" "+xsave" "-target-feature" "+sse4.2" "-target-feature" "-avx512pf" "-target-feature" "-tsxldtrk" "-target-feature" "+ptwrite" "-target-feature" "+widekl" "-target-feature" "-sm3" "-target-feature" "+invpcid" "-target-feature" "+64bit" "-target-feature" "+xsavec" "-target-feature" "-avx10.1-512" "-target-feature" "-avx512vpopcntdq" "-target-feature" "+cmov" "-target-feature" "-avx512vp2intersect" "-target-feature" "-avx512cd" "-target-feature" "+movbe" "-target-feature" "-avxvnniint8" "-target-feature" "-avx512er" "-target-feature" "-ccmp" "-target-feature" "-amx-int8" "-target-feature" "+kl" "-target-feature" "-avx10.1-256" "-target-feature" "-evex512" "-target-feature" "+avxvnni" "-target-feature" "-rtm" "-target-feature" "+adx" "-target-feature" "+avx2" "-target-feature" "+hreset" "-target-feature" "+movdiri" "-target-feature" "+serialize" "-target-feature" "-sha512" "-target-feature" "+vpclmulqdq" "-target-feature" "-avx512vl" "-target-feature" "-uintr" "-target-feature" "-cf" "-target-feature" "+clflushopt" "-target-feature" "-raoint" "-target-feature" "-cmpccxadd" "-target-feature" "+bmi" "-target-feature" "-amx-tile" "-target-feature" "+sse" "-target-feature" "+gfni" "-target-feature" "-avxvnniint16" "-target-feature" "-amx-fp16" "-target-feature" "-ndd" "-target-feature" "+xsaveopt" "-target-feature" "+rdrnd" "-target-feature" "-avx512f" "-target-feature" "-amx-bf16" "-target-feature" "-avx512bf16" "-target-feature" "-avx512vnni" "-target-feature" "-push2pop2" "-target-feature" "+cx8" "-target-feature" "-avx512bw" "-target-feature" "+sse3" "-target-feature" "+pku" "-target-feature" "+fsgsbase" "-target-feature" "-clzero" "-target-feature" "-mwaitx" "-target-feature" "-lwp" "-target-feature" "+lzcnt" "-target-feature" "+sha" "-target-feature" "+movdir64b" "-target-feature" "-ppx" "-target-feature" "-wbnoinvd" "-target-feature" "-enqcmd" "-target-feature" "-prefetchwt1" "-target-feature" "-avxneconvert" "-target-feature" "-tbm" "-target-feature" "-pconfig" "-target-feature" "-amx-complex" "-target-feature" "+ssse3" "-target-feature" "+cx16" "-target-feature" "+bmi2" "-target-feature" "+fma" "-target-feature" "+popcnt" "-target-feature" "-avxifma" "-target-feature" "+f16c" "-target-feature" "-avx512bitalg" "-target-feature" "-rdpru" "-target-feature" "+clwb" "-target-feature" "+mmx" "-target-feature" "+sse2" "-target-feature" "+rdseed" "-target-feature" "-avx512vbmi2" "-target-feature" "-prefetchi" "-target-feature" "+rdpid" "-target-feature" "-fma4" "-target-feature" "-avx512vbmi" "-target-feature" "+shstk" "-target-feature" "+vaes" "-target-feature" "+waitpkg" "-target-feature" "-sgx" "-target-feature" "+fxsr" "-target-feature" "-avx512dq" "-target-feature" "-sse4a" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/kostadin" "-fcoverage-compilation-dir=/home/kostadin" "-resource-dir" "/usr/lib/llvm/19/bin/../../../../lib/clang/19" "-include" "/usr/include/gentoo/fortify.h" "-include" "/usr/include/gentoo/maybe-stddefs.h" "-internal-isystem" "/usr/lib/llvm/19/bin/../../../../lib/clang/19/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-stack-protector" "2" "-fstack-clash-protection" "-fcf-protection=none" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcolor-diagnostics" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"
```
[complete build log from portage](https://github.com/llvm/llvm-project/files/15210489/build.log)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8Wd9zmzr2_2vIi0YMCOzYD3lITLjfzG2a7zS93Z198QhxAG2ERCWB3f71OwLj5Cap5e60O-PBIB2dn59z9Isaw2sJcBUsboJFdkF72yh99aSMpSWXprkoVPnt6sOHL_eoolwYZBUqei5KtGtAot5wWaNgGeGWatYESSap5QMEywgpiahEd9KCQBulAfEFipNlFP2ZB2SDNHRalT3jhQBUKNu4AS01FjSiFjXWdiZIrgOSBySvuW36ImSqDUguxDD_4U6rfwOzAcmZals-vhRRvCjWwNZpuiwSGidRsl5FLFovKpqmpFxAuqyKClFZogG04UqieBXG4SKIsiC6PjyX0eE3fubXdx9usyC5RoIXAckf-65T2sm7-XD9520SkHxzT58g5wJMQHLnsgPNjaBPkIQl1wHJi_FjS4f9Iibb_WqJl-m2l3wfPoYKHUSTvDeOeBJ1sDdeu-FcOhMFlTXC2faPj39tHx_--rS5dV_bx8_ZZrt5-Pj4-frj5-399ebTw-NzR_7w6f76bfOHu_u759a7gOStdHY51WkNf3sz3wwuYQAx-z9eh1EYhev12mm3U_rp0LMdUYJpwZ2R22Ua0rZcpkejXvvv10n-H4j4sXFcMtGX8EutmXkinH3Mbm_--gO9yjaEHwjCHe8A4er_7zauf8TXIBC-z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