[PATCH] D143107: [SPIR-V] Emit spv_undef intrinsic for aggregate undef operands

Michal Paszkowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 13:10:07 PST 2023


mpaszkowski created this revision.
mpaszkowski added reviewers: iliya-diyachkov, konrad.trifunovic, zuban32, arsenm, rengolin, MaskRay, andreytr.
Herald added subscribers: ThomasRaoux, hiraditya.
Herald added a project: All.
mpaszkowski requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

This change adds a new spv_undef intrinsic which is emitted in place of aggregate undef operands and later selected to single OpUndef SPIR-V instruction. The behavior matches that of Khronos SPIR-V Translator and should support nested aggregates.

This is an alternative better approach to the one discussed in https://reviews.llvm.org/D141337.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143107

Files:
  llvm/include/llvm/IR/IntrinsicsSPIRV.td
  llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
  llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
  llvm/test/CodeGen/SPIRV/instructions/undef-nested-composite-store.ll
  llvm/test/CodeGen/SPIRV/instructions/undef-simple-composite-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143107.494049.patch
Type: text/x-patch
Size: 5275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230201/5bc91c8b/attachment.bin>


More information about the llvm-commits mailing list