[llvm] [SPIR-V] Fix OpenCL integer dot product lowering (PR #177258)

Marcos Maronas via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 06:37:28 PST 2026


================
@@ -1866,8 +1874,8 @@ static bool generateDotOrFMulInst(const StringRef DemangledCall,
       LLVMContext &Ctx = MIRBuilder.getContext();
       SmallVector<StringRef, 10> TypeStrs;
       SPIRV::parseBuiltinTypeStr(TypeStrs, DemangledCall, Ctx);
-      bool IsFirstSigned = TypeStrs[0].trim()[0] != 'u';
-      bool IsSecondSigned = TypeStrs[1].trim()[0] != 'u';
+      bool IsFirstSigned = TypeStrs.size() > 0 && TypeStrs[0].trim()[0] != 'u';
----------------
maarquitos14 wrote:

Is there any case where we expect `TypeStrs <= 0`? If not, should we add an assertion?

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


More information about the llvm-commits mailing list