Skip to content

nv50/ir: check for hasJoin before propagating joins

Karol Herbst requested to merge karolherbst/mesa:nv_fix_flattening into main

given this part of an shader the bra BB:7 in B:5 would get replaced by join even if the target doesn't support jumping joins.

BB:5
 54: mov u32 $r1 0x00000000
 55: bra BB:7  <== join from BB:7 would get propagated
BB:6
 56: set ftz u8 $p0 neu f32 $r1 $r255
 57: selp u32 $r1 $r255 0xffffffff not $p0
 58: bra BB:7
BB:7
 59: join
BB:8

Fixes: 5959d424 ("nv50/ir/opt: Fix tryPropagateBranch for BBs with several exit branches.")

Merge request reports