浏览代码

nir: Propagate negates up multiplication chains.

total instructions in shared programs: 7112159 -> 7088092 (-0.34%)
instructions in affected programs: 1374915 -> 1350848 (-1.75%)
helped: 7392
HURT: 621

GAINED: 2
LOST:   2
tags/12.0-branchpoint
Matt Turner 9 年前
父节点
当前提交
6702f1acde
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/compiler/nir/nir_opt_algebraic.py

+ 4
- 0
src/compiler/nir/nir_opt_algebraic.py 查看文件

@@ -269,6 +269,10 @@ optimizations = [
(('fabs', ('fsub', 0.0, a)), ('fabs', a)),
(('iabs', ('isub', 0, a)), ('iabs', a)),

# Propagate negation up multiplication chains
(('fmul', ('fneg', a), b), ('fneg', ('fmul', a, b))),
(('imul', ('ineg', a), b), ('ineg', ('fmul', a, b))),

# Misc. lowering
(('fmod', a, b), ('fsub', a, ('fmul', b, ('ffloor', ('fdiv', a, b)))), 'options->lower_fmod'),
(('uadd_carry', a, b), ('b2i', ('ult', ('iadd', a, b), a)), 'options->lower_uadd_carry'),

正在加载...
取消
保存