We'll probably need something like this for d3dbc sources as well, since those generally aren't terminated by a "ret" instruction either, so in that sense this seems fine. I'm tempted to suggest handling this by appending a "ret" instruction to the vkd3d_shader_instruction_array if it doesn't already end with one, but I'd like to hear what Zeb and Conor think in any case.
That shader does seem slightly suspicious though; do we know more about where it came from or how it was produced? Was this shipped with the application, or e.g. produced at run-time from HLSL source? Does it perhaps contain a RDEF section with a creator string?