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

    <tr>
        <th>Summary</th>
        <td>
            Raptor Lake cpu detected as goldmont
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          kostadin04
      </td>
    </tr>
</table>

<pre>
    CPU: Intel Core i5-13600KF
LLVM Version: 15.0.6

`llc --version` reports the host cpu as `Host CPU: goldmont` 

`echo | clang -E - -march=native -###`

`"/usr/lib/llvm/15/bin/clang-15" "-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" "goldmont" "-target-feature" "-avx512pf" "-target-feature" "-tsxldtrk" "-target-feature" "+cx16" "-target-feature" "+sahf" "-target-feature" "-tbm" "-target-feature" "-avx512ifma" "-target-feature" "+sha" "-target-feature" "+crc32" "-target-feature" "-fma4" "-target-feature" "+vpclmulqdq" "-target-feature" "+prfchw" "-target-feature" "+bmi2" "-target-feature" "-cldemote" "-target-feature" "+fsgsbase" "-target-feature" "-avx512bf16" "-target-feature" "-amx-tile" "-target-feature" "-uintr" "-target-feature" "+gfni" "-target-feature" "+popcnt" "-target-feature" "+ptwrite" "-target-feature" "+aes" "-target-feature" "-avx512bitalg" "-target-feature" "+movdiri" "-target-feature" "+widekl" "-target-feature" "+xsaves" "-target-feature" "-avx512er" "-target-feature" "+avxvnni" "-target-feature" "-avx512fp16" "-target-feature" "-avx512vnni" "-target-feature" "-amx-bf16" "-target-feature" "-avx512vpopcntdq" "-target-feature" "-pconfig" "-target-feature" "+clwb" "-target-feature" "-avx512f" "-target-feature" "+xsavec" "-target-feature" "-clzero" "-target-feature" "+pku" "-target-feature" "+mmx" "-target-feature" "-lwp" "-target-feature" "+rdpid" "-target-feature" "-xop" "-target-feature" "+rdseed" "-target-feature" "+waitpkg" "-target-feature" "+kl" "-target-feature" "+movdir64b" "-target-feature" "-sse4a" "-target-feature" "-avx512bw" "-target-feature" "+clflushopt" "-target-feature" "+xsave" "-target-feature" "-avx512vbmi2" "-target-feature" "+64bit" "-target-feature" "-avx512vl" "-target-feature" "+serialize" "-target-feature" "+hreset" "-target-feature" "+invpcid" "-target-feature" "-avx512cd" "-target-feature" "+avx" "-target-feature" "+vaes" "-target-feature" "-amx-int8" "-target-feature" "+cx8" "-target-feature" "+fma" "-target-feature" "-rtm" "-target-feature" "+bmi" "-target-feature" "-enqcmd" "-target-feature" "+rdrnd" "-target-feature" "-mwaitx" "-target-feature" "+sse4.1" "-target-feature" "+sse4.2" "-target-feature" "+avx2" "-target-feature" "+fxsr" "-target-feature" "-wbnoinvd" "-target-feature" "+sse" "-target-feature" "+lzcnt" "-target-feature" "+pclmul" "-target-feature" "-rdpru" "-target-feature" "+f16c" "-target-feature" "+ssse3" "-target-feature" "-sgx" "-target-feature" "-prefetchwt1" "-target-feature" "+cmov" "-target-feature" "-avx512vbmi" "-target-feature" "+shstk" "-target-feature" "+movbe" "-target-feature" "-avx512vp2intersect" "-target-feature" "+xsaveopt" "-target-feature" "-avx512dq" "-target-feature" "+sse2" "-target-feature" "+adx" "-target-feature" "+sse3"
`

Meaning it is targetting the goldmont architecture, unlike gcc, which is targetting alderlake

`gcc -march=native -E -v - </dev/null 2>&1 | grep cc1`

 `/usr/libexec/gcc/x86_64-pc-linux-gnu/12/cc1 -E -quiet -v - -march=alderlake -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mno-sse4a -mno-fma4 -mno-xop -mfma -mno-avx512f -mbmi -mbmi2 -maes -mpclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mgfni -mvpclmulqdq -mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -madx -mabm -mno-cldemote -mclflushopt -mclwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mlzcnt -mmovbe -mmovdir64b -mmovdiri -mno-mwaitx -mno-pconfig -mpku -mno-prefetchwt1 -mprfchw -mptwrite -mrdpid -mrdrnd -mrdseed -mno-rtm -mserialize -mno-sgx -msha -mshstk -mno-tbm -mno-tsxldtrk -mvaes -mwaitpkg -mno-wbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mhreset -mno-kl -mno-widekl -mavxvnni -mno-avx512fp16 --param l1-cache-size=48 --param l1-cache-line-size=64 --param l2-cache-size=24576 -mtune=generic -dumpbase -`

I also have manually disabled the E-cores in bios, and still the output from clang is the same, targetting the E-cores. Is this normal behaviour - just targetting the lowest common denominator or is it a bug?

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMGF2P6yru16QviFFD0szMQx_OmZlqj_ZcabXS3tcVASfhlo8MkDT3_PoVIWmnPatSqWowNraxjbGhzolWA-yz3fds976hg--M3R-N85QLvS03teF_79_-9Z-s-IZ-aA8SvRkLSOxwXlTb7T8P2fY92377-fPPP9CfYJ0wOpDmu6ftUxVxy3-1lZIhjMeFqtoiC72x3iHfAeqM84j1A6IOZdX2HwFc5LZGcmW0D0tuWALrDMqe3xCTVLcIfyCMsKKWdVnxrqkXIyCckWL5Vdub9RkhGTkMzmbkIEUd_uWoMnLIdxk51EJn5DCzxmGCoIwQzFi-Dr0VvYQFml6q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