vpykhtin added a comment.
Another thought: at some point I realised that I put ? or 0 in different places as a stub for missing operand in encoding, I think we should unify this and use 0 everywhere. What if to try using !if(ps.has_glc{0}, glc{0}, 0)?
https://reviews.llvm.org/D24463