This fixes liveness analysis with respect to inline constants and
branching. in practice, the symptom is abnormally high register
pressure.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ryan Houdek <Sonicadvance1@gmail.com>
static bool
midgard_is_live_in_instr(midgard_instruction *ins, int src)
{
- if (ins->ssa_args.src0 == src) return true;
- if (ins->ssa_args.src1 == src) return true;
+ if (ins->compact_branch)
+ return false;
+
+ if (ins->ssa_args.src0 == src)
+ return true;
+
+ if (!ins->ssa_args.inline_constant && ins->ssa_args.src1 == src)
+ return true;
return false;
}