nvc0/ir: Teach insnCanLoad about double immediates
authorHans de Goede <hdegoede@redhat.com>
Thu, 5 Nov 2015 13:32:37 +0000 (14:32 +0100)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 6 Nov 2015 23:13:31 +0000 (18:13 -0500)
commit9f2f8bda6e060cb85f6e099a4ad65c58cde36ba0
treefc4264f2e5ed1822070f553398c5a8216f2a3025
parent428506ece2c7627392d0f02c7f83021caa46bb4f
nvc0/ir: Teach insnCanLoad about double immediates

Teach insnCanLoad about double immediates, together with the
"Add support for merge-s to the ConstantFolding pass"

This turns the following (nvc0) code:
  1: mov u32 $r2 0x00000000 (8)
  2: mov u32 $r3 0x3fe00000 (8)
  3: add f64 $r0d $r0d $r2d (8)

Into:
  1: add f64 $r0d $r0d 0.500000 (8)

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp