Thanks. To give you an update, this is a super subtle control flow handling bug in LLVM -- and the difference between the original shader and your modification at the LLVM input is merely that the sense of one branch is (correctly) inverted, leading LLVM down a subtly different path in the end. A sledge-hammer fix is quite simple, but I'm still thinking about how to get a better fix which doesn't pessimize a bunch of cases.