Re: [Mesa-dev] [PATCH 2/2] nv50/ir: improve POW lowering

2017-07-23 Thread Ilia Mirkin
This approach is generally right but implemented in the wrong place. This "lowerPOW" happens pre-ssa. What actually needs to happen is that this type of optimization is done at SSA time as part of ConstantFolding. And the fallback for POW should be implemented as part of the "legalize" step. That w

Re: [Mesa-dev] [PATCH 2/2] nv50/ir: improve POW lowering

2017-06-22 Thread Karol Herbst
On Thu, Jun 22, 2017 at 9:44 PM, Roland Scheidegger wrote: > Am 22.06.2017 um 21:28 schrieb Karol Herbst: >> If the exponent is a small integer immediate value, we can lower POW to >> MULs instead to save a few instructions. Also MUL instructions execute >> faster than what we lower POW in the def

Re: [Mesa-dev] [PATCH 2/2] nv50/ir: improve POW lowering

2017-06-22 Thread Roland Scheidegger
Am 22.06.2017 um 21:28 schrieb Karol Herbst: > If the exponent is a small integer immediate value, we can lower POW to > MULs instead to save a few instructions. Also MUL instructions execute > faster than what we lower POW in the default case to. > > score change for GpuTest /test=pixmark_piano /

[Mesa-dev] [PATCH 2/2] nv50/ir: improve POW lowering

2017-06-22 Thread Karol Herbst
If the exponent is a small integer immediate value, we can lower POW to MULs instead to save a few instructions. Also MUL instructions execute faster than what we lower POW in the default case to. score change for GpuTest /test=pixmark_piano /benchmark /no_scorebox /msaa=0 /benchmark_duration_ms=6