lima/gpir: A few optimizations for branches (rebased)
I picked up the 2 remaining patches from !2315 (closed) and rebased them on top of master including !6506 (merged)
Looking at the shader-db results i think, we should finish @cwabbott0's work and get them merged.