So, I've looked into this again out of curiosity, because I do have an LLVM patch that can be used to work around this. However, the patch introduces some inefficiencies, and this is a game bug: it is clear from playing with the provided apitrace that a derivative is taken after a non-uniform discard/kill, which is undefined behaviour in GLSL. Does anybody paying attention to this bug report know of a way to contact the game developer about this?