From 3c4e721dd48d48b409a3740b42fc459bf6d7828e Mon Sep 17 00:00:00 2001 From: daanx Date: Thu, 30 May 2024 17:27:36 -0700 Subject: [PATCH] use -march=haswell on -O2 --- src/Compile/Options.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compile/Options.hs b/src/Compile/Options.hs index c4009f201..5641bf9ca 100644 --- a/src/Compile/Options.hs +++ b/src/Compile/Options.hs @@ -1153,7 +1153,7 @@ ccGcc name opt platform path archBits= 8 * sizePtr platform arch = -- unfortunately, these flags are not as widely supported as one may hope so we only enable at -O2 or higher if (opt < 2) then [] - else if (cpuArch=="x64" && archBits==64) then ["-march=x86-64-v3","-mtune=native"] -- popcnt, lzcnt, tzcnt, pdep, pext (2013, Haswell) + else if (cpuArch=="x64" && archBits==64) then ["-march=haswell","-mtune=native"] -- Haswell (2013) = x86-64-v3: popcnt, lzcnt, tzcnt, pdep, pext else if (cpuArch=="arm64" && archBits==64) then ["-march=armv8.1-a","-mtune=native"] -- popcnt, simd, lse else []