glsl: clone operands before feeding them into swizzle

FOLD into change which adds double_dot_to_fma

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
glsl: split double frexp into two parts

the tgsi layer can reassemble this into a single instruction
to hand to the gallium drivers.

leave frexp alone for now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
st_glsl_to_tgsi: handle DFRACEXP

we need to handle two dst instructions for this,

we emit two DFRACEXP with one defined and one undefined dst,
then merge them later. this proved easier than the other bad
ideas I had.

Signed-off-by: Dave Airlie <airlied@redhat.com>
frexp: oops should be ints not unsigned ints
nvc0/ir: add emission of dadd/dmul/dmad opcodes, fix minmax

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: fix lowering of RSQ/RCP/SQRT/MOD to work with F64

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
HACK nvc0/ir: populate shader header bit indicating fp64

HACK ALERT: this should figure out if the shader's doing fp64 stuff and
use that to populate the header.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: no instruction can load a double immediate

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: add support for new TGSI double opcodes

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
temporarily claim to have sqrt
nvc0/ir: remove merge/split pairs to allow normal propagation to occur

Because the TGSI interface creates merges for each instruction source
and then splits them back out, there are a lot of unnecessary
merge/split pairs which do essentially nothing. The various modifier/etc
propagation doesn't know how to walk though those, so just remove them
when they're unnecessary.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: handle zero and negative sqrt arguments

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: fix hard-coded TYPE_U32 sized register

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: fix phi sources when a phi def has been merged

In a situation where double-register values are used, the phi nodes can
still end up being u32 values. They all get merged into one RA node
though. When fixing up the merge (which comes after the phi node), the
phi node's def would get fixed, but not its sources which would remain
at the low register value.

This maintains the invariant that a phi node's defs and sources are
allocated the same register.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>