[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Sun May 12 06:16:18 PDT 2024


phoebewang wrote:

> @tstellar Can a note be added somewhere about this? Folks upgrading to llvm-18.1.6 will get errors unless they drop -march=native if they were on 18.1.5

Although I agree we should add a note, I don't think this patch affects much. The problem only coccurs when combining `-march=native` with AVX512 options on a non AVX512 target. This actually is not a valid scenario. The compiled binary will contain AVX512 instruction which crashes it on the target. It violates the intention of using `-march=native`. I also don't see where the error from with 18.1.6. If there were errors, it should come from 18.1.5.

https://github.com/llvm/llvm-project/pull/91694


More information about the cfe-commits mailing list