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.
I don't really understand why you need to handle this in an IR pass, undoes could easily appear at any time