Skip to content

nir: Optimize fpow with small constant exponents

Konstantin Seurer requested to merge KonstantinSeurer/mesa:nir-pow-opt into main
nir: Optimite a^3 and a^5

They would be turned into exp(log(a)*b) instead, which is slow.

Totals from 971 (1.14% of 85071) affected shaders:
Instrs: 3572458 -> 3571254 (-0.03%); split: -0.03%, +0.00%
CodeSize: 19183916 -> 19174216 (-0.05%); split: -0.05%, +0.00%
VGPRs: 65928 -> 65936 (+0.01%); split: -0.01%, +0.02%
SpillSGPRs: 826 -> 788 (-4.60%)
Latency: 38194626 -> 38161179 (-0.09%); split: -0.10%, +0.01%
InvThroughput: 9273650 -> 9267234 (-0.07%); split: -0.07%, +0.00%
SClause: 101038 -> 100992 (-0.05%); split: -0.05%, +0.00%
Copies: 290770 -> 290141 (-0.22%); split: -0.23%, +0.01%
PreSGPRs: 71333 -> 71159 (-0.24%)
PreVGPRs: 60823 -> 60669 (-0.25%)

Merge request reports