[PATCH] Detect Haswell subarchitecture (i.e. using -march=native)


This is my first patch on this list, however I've already submitted several trough bug tracking system. Since it probably needs some review I am submitting it here.

The main intent of this patch is to detect "core-avx2" platform on Haswell i7 CPUs when running -march=native. Currently it detects it as generic x86_64.

* Haswell is detected for CPUID Family 6 Model 60
* Similar to Ivy and Sandy Bridge we check for AVX2 since some Haswell Pentiums are SSE4.x only
* I have marked HasAVX2 as volatile, since otherwise it gets magically zeroed when compiling with clang with clang

* Also enabling X86::FeatureFastUAMem for Haswell


llvm-detect-haswell.patch (1.72 KB)

Excuse me, wrong mailing list :slight_smile: Should have drunk some coffee before posting.