Stack Overflow in SPIR-V Compiler

Hey - so to simulate flow control, we’re generating shaders with an outer while loop and inner switch statement, and this works for fairly simple shaders.
However, with more complex shaders (ones that jump around), the compiler decides to crash with a stack overflow.

I’ve looked over the SPIR-V IR, and I don’t see any obvious flaws in our generation (though it could be possible).

Here’s the SPIR-V shader that’s causing the crash: