From: Andreas Beckmann Date: Wed, 27 Jan 2021 20:26:51 +0000 (+0100) Subject: [PATCH] restore setting unroll-threshold on LLVM 9 X-Git-Tag: archive/raspbian/1.8-1+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e3848f7ae9a980f57e37a26d3d8e01299b2bd6b6;p=pocl.git [PATCH] restore setting unroll-threshold on LLVM 9 otherwise kernel/test_rotate hangs on avx512 capable cpus (this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee) Gbp-Pq: Name 2003-restore-setting-unroll-threshold-on-LLVM-9.patch --- diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc index 2d4fc0d..2cc86ea 100644 --- a/lib/CL/pocl_llvm_utils.cc +++ b/lib/CL/pocl_llvm_utils.cc @@ -345,6 +345,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 } }