[llvm] Emit debug type vector (PR #200056)
Manuel Carrasco via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 07:12:50 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)
----------------
mgcarrasco wrote:
I'm asking this to learn, what's this restriction for? What sort of code could generate an instance where Elements.size() != 1? Could we add a test for that scenario?
https://github.com/llvm/llvm-project/pull/200056
More information about the llvm-commits
mailing list