[PATCH 099/144] 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>
Fri, 7 Jan 2022 23:55:22 +0000 (23:55 +0000)
otherwise kernel/test_rotate hangs on avx512 capable cpus

all other llvm releases work fine without this setting

(this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee)

fixes: #915

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

lib/CL/pocl_llvm_utils.cc

index 675094d2ed1794dddf8b7bfdde661b47c5b4d23c..bcbf2e47ae188497d10dbdac25a57c9f369bb5ba 100644 (file)
@@ -344,6 +344,11 @@ void InitializeLLVM() {
       assert(O && "could not find LLVM option 'debug'");
       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
   }
 }