1From 26bc87fdad9f29c00a5e37d6d9aed7f6dc7ff416 Mon Sep 17 00:00:00 2001 2From: Anuj Mittal <anuj.mittal@intel.com> 3Date: Mon, 12 Apr 2021 14:15:53 +0800 4Subject: [PATCH] Disable use of _tpause instruction 5 6It is assuming right now that WAITPKG instructions are available when using 7gcc 11 or clang 12. It's possible that we are building for a 8CPU where it's not available - in this case anything older than Alder Lake. 9 10Disable for now until the detection isn't fixed upstream. 11 12Upstream-Status: Inappropriate 13 14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> 15--- 16 src/tbb/scheduler_common.h | 2 +- 17 1 file changed, 1 insertion(+), 1 deletion(-) 18 19--- a/src/tbb/scheduler_common.h 20+++ b/src/tbb/scheduler_common.h 21@@ -220,7 +220,7 @@ inline void prolonged_pause_impl() { 22 #endif 23 24 inline void prolonged_pause() { 25-#if __TBB_WAITPKG_INTRINSICS_PRESENT && (_WIN32 || _WIN64 || __unix__) && (__TBB_x86_32 || __TBB_x86_64) 26+#if 0 27 if (governor::wait_package_enabled()) { 28 std::uint64_t time_stamp = machine_time_stamp(); 29 // _tpause function directs the processor to enter an implementation-dependent optimized state 30