From 873a9fa7e5083de46f37718d0805aeec176af584 Mon Sep 17 00:00:00 2001
From: Wunkolo <Wunkolo@gmail.com>
Date: Wed, 23 Feb 2022 20:28:25 -0800
Subject: [PATCH] cpu_detect: Add missing `lzcnt` detection

---
 src/common/x64/cpu_detect.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp
index 65369bfbeb..a95dc15a3d 100644
--- a/src/common/x64/cpu_detect.cpp
+++ b/src/common/x64/cpu_detect.cpp
@@ -138,6 +138,7 @@ static CPUCaps Detect() {
     if (max_ex_fn >= 0x80000001) {
         // Check for more features
         __cpuid(cpu_id, 0x80000001);
+        caps.lzcnt = Common::Bit<5>(cpu_id[2]);
         caps.fma4 = Common::Bit<16>(cpu_id[2]);
     }