Skip to content
  • Timothy Arceri's avatar
    nir: propagates if condition evaluation down some alu chains · 2975422c
    Timothy Arceri authored
    
    
    v2:
     - only allow nir_op_inot or nir_op_b2i when alu input is 1.
     - use some helpers as suggested by Jason.
    
    v3:
     - evaluate alu op for single input alu ops
     - add helper function to decide if to propagate through alu
     - make use of nir_before_src in another spot
    
    shader-db IVB results:
    
    total instructions in shared programs: 9993483 -> 9993472 (-0.00%)
    instructions in affected programs: 1300 -> 1289 (-0.85%)
    helped: 11
    HURT: 0
    
    total cycles in shared programs: 219476091 -> 219476059 (-0.00%)
    cycles in affected programs: 7675 -> 7643 (-0.42%)
    helped: 10
    HURT: 1
    
    Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    2975422c