[clang] [llvm] [HIPSPV] Add in-tree SPIR-V backend support for chipStar (PR #186972)

Henry Linjamäki via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 06:01:15 PDT 2026


================
@@ -73,10 +72,55 @@ void HIPSPV::Linker::constructLinkAndEmitSpirvCommand(
   tools::constructLLVMLinkCommand(C, *this, JA, Inputs, LinkArgs, Output, Args,
                                   TempFile);
 
-  // Post-link HIP lowering.
+  auto T = getToolChain().getTriple();
+
+  if (T.getOS() == llvm::Triple::ChipStar) {
+    // chipStar: run HipSpvPasses via opt, then use the in-tree SPIR-V backend
+    // for codegen (replaces the external llvm-spirv translator).
----------------
linehill wrote:

Is the SPIR-V backend in a shape the chipStar can fully rely on it over the llvm-spirv?

https://github.com/llvm/llvm-project/pull/186972


More information about the cfe-commits mailing list