Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    Instead of using a variable and evaling it, you could have used a function Commented Jan 27, 2021 at 8:48
  • As an FYI, my old AMD FX-6100 supports v2, but not v3 or v4. Commented Jan 27, 2021 at 18:47
  • 1
    @RonJohn: Yup, even Bulldozer-family is only "level 2", even though Excavator has AVX2 and FMA. It's missing BMI2 and movbe. (Piledriver / Steamroller have AVX1 and FMA; Bulldozer has AVX1 and FMA4 but not FMA3; Intel pulled the rug out from under AMD as late as they could. See Stop the instruction set war on Agner Fog's blog.) To be fair, having another level with AVX but not BMI2 would be of limited value, and BMI2 is quite nice for Intel CPUs: variable-count shifts with SHLX/SHRX are 1 uop instead of 3, and can use any reg instead of CL Commented Jan 27, 2021 at 19:16
  • 1
    Level 3 = Haswell and Zen1. Level 4 = -march=skylake-avx512. Commented Jan 27, 2021 at 19:16