Skip to content

Commit

Permalink
use -march=haswell on -O2
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed May 31, 2024
1 parent 5a787f2 commit 3c4e721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compile/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 []

Expand Down

0 comments on commit 3c4e721

Please sign in to comment.