[llvm] [SPIR-V] Fix an undefined behaviour in the SPIRV emit-intrinsics pass (PR #123620)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 06:44:44 PST 2025


================
@@ -2475,8 +2475,10 @@ void SPIRVEmitIntrinsics::parseFunDeclarations(Module &M) {
     if (DemangledName.empty())
       continue;
     // allow only OpGroupAsyncCopy use case at the moment
-    auto [Grp, Opcode, ExtNo] =
-        SPIRV::mapBuiltinToOpcode(DemangledName, InstrSet);
----------------
VyacheslavLevytskyy wrote:

Not necessarily, it is in use in one more piece of the code in deduceOperandElementTypeCalledFunction(). However, it may make sense indeed, because it's the only use of it, so caching improves nothing.

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


More information about the llvm-commits mailing list