From 786e6a2af8e4ab0c9170637aca7601575ed944c2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 13 Aug 2020 15:12:15 -0500 Subject: [PATCH] clover/spirv: Don't call llvm::regularizeLlvmForSpirv writeSpirv() already takes care of that, and calling it twice seems to duplicate functions and cause problems when processing execution modes. Fixes: 2043c5f37cf "clover/llvm: Add functions for compiling from..." Acked-by: Daniel Stone Reviewed-by: Pierre Moreau Reviewed-by: Boris Brezillon Reviewed-by: Karol Herbst Part-of: (cherry picked from commit e3e45e2456d2dc7eccf03d7c93bc9cee823a1eec) --- .pick_status.json | 2 +- src/gallium/frontends/clover/llvm/invocation.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9f0389006b5..0d72c2bd3ca 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1921,7 +1921,7 @@ "description": "clover/spirv: Don't call llvm::regularizeLlvmForSpirv", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "2043c5f37cf1f1b64a8f5d9ae04bbf8e7860f616" }, diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp index 95a9d036622..bedba9fa5b7 100644 --- a/src/gallium/frontends/clover/llvm/invocation.cpp +++ b/src/gallium/frontends/clover/llvm/invocation.cpp @@ -439,11 +439,6 @@ clover::llvm::compile_to_spirv(const std::string &source, debug::log(".ll", print_module_bitcode(*mod)); std::string error_msg; - if (!::llvm::regularizeLlvmForSpirv(mod.get(), error_msg)) { - r_log += "Failed to regularize LLVM IR for SPIR-V: " + error_msg + ".\n"; - throw error(CL_INVALID_VALUE); - } - std::ostringstream os; if (!::llvm::writeSpirv(mod.get(), os, error_msg)) { r_log += "Translation from LLVM IR to SPIR-V failed: " + error_msg + ".\n";