nir: lower frcp
This MR adds a lower_frcp
-flag to nir_shader_compiler_options
that optionally lowers frcp
instructions to fdiv
instructions.
This allows us to emit code like x*rcp(y)
as x/y
for SPIR-V and DXIL instead of x*(1/y)
.
The reason this needs its own flag, is that it needs to prevent the 1.0/x
-> rcp(x)
lowering to avoid infinite loops during compilation.