On Fri Jan 12 13:50:07 2024 +0000, Giovanni Mascellani wrote:
I don't think there is any need to emit an error for a PHI with a single incoming block. It's a bit silly, but it should fit any processing algorithm I have in mind without special handling. OTOH, do you think there is any condition under which we could have a PHI node in which registers have a modifier? Especially for the destination register, it would be a bit annoying for my algorithm which removes PHI nodes.
SPIR-V validation will fail on a single incoming if it gets that far. I know because silly things happen occasionally :D
Modifiers are only used on source operands, and PHI incomings are always SSA results or IMMCONST, so no modifiers are possible.