From e3e45e2456d2dc7eccf03d7c93bc9cee823a1eec 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: --- src/gallium/frontends/clover/llvm/invocation.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp index f7c0313be4d..38070a94e02 100644 --- a/src/gallium/frontends/clover/llvm/invocation.cpp +++ b/src/gallium/frontends/clover/llvm/invocation.cpp @@ -460,11 +460,6 @@ clover::llvm::compile_to_spirv(const std::string &source, const auto spirv_options = get_spirv_translator_options(dev); 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(), spirv_options, os, error_msg)) { r_log += "Translation from LLVM IR to SPIR-V failed: " + error_msg + ".\n"; -- 2.30.2