[llvm] Emit debug type vector (PR #200056)
Manuel Carrasco via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 07:11:17 PDT 2026
================
@@ -587,6 +595,32 @@ void SPIRVNonSemanticDebugHandler::emitNonSemanticGlobalDebugInfo(
DebugTypeRegs[BT] = BTReg;
}
+ // Emit DebugTypeVector for each collected vector type. Skip vectors whose
+ // element type is not a DIBasicType (composite element types are not yet
+ // supported) and vectors with a non-constant subrange count (not yet
+ // supported).
+ for (const DICompositeType *VT : VectorTypes) {
+ const auto *BaseTy = dyn_cast_or_null<DIBasicType>(VT->getBaseType());
+ if (!BaseTy)
+ continue;
+ auto BTIt = DebugTypeRegs.find(BaseTy);
+ if (BTIt == DebugTypeRegs.end())
+ continue;
+
+ DINodeArray Elements = VT->getElements();
+ if (Elements.size() != 1)
+ continue;
+ const auto *SR = cast<DISubrange>(Elements[0]);
+ const auto *CI = dyn_cast_if_present<ConstantInt *>(SR->getCount());
----------------
mgcarrasco wrote:
Do we have a test for the case where it is a "non-constant subrange count"?
https://github.com/llvm/llvm-project/pull/200056
More information about the llvm-commits
mailing list