[PATCH] restore setting unroll-threshold on LLVM 9
authorAndreas Beckmann <anbe@debian.org>
Wed, 27 Jan 2021 20:26:51 +0000 (21:26 +0100)
committerAndreas Beckmann <anbe@debian.org>
Wed, 3 Feb 2021 20:21:03 +0000 (20:21 +0000)
otherwise kernel/test_rotate hangs on avx512 capable cpus

(this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee)

Gbp-Pq: Name 0003-restore-setting-unroll-threshold-on-LLVM-9.patch

lib/CL/pocl_llvm_utils.cc

index aa0d33dd7cbac23dfc263c7267e837d2f8c2ebcb..7ff66450ab5eca0bb0e9fc86c95ad54dad0e9b51 100644 (file)
@@ -347,6 +347,12 @@ void InitializeLLVM() {
     O->addOccurrence(1, StringRef("debug"), StringRef("true"), false);
   }
 
+#if LLVM_MAJOR == 9
+  O = opts["unroll-threshold"];
+  assert(O && "could not find LLVM option 'unroll-threshold'");
+  O->addOccurrence(1, StringRef("unroll-threshold"), StringRef("1"), false);
+#endif
+
   LLVMInitialized = true;
 }