i965/vec4: don't constant propagate 64-bit immediates
authorConnor Abbott <connor.w.abbott@intel.com>
Thu, 13 Aug 2015 22:44:14 +0000 (15:44 -0700)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:51 +0000 (11:26 +0100)
v2: Also check if the instruction source target is 64-bit. (Samuel)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index 739f33eed34cadce711e0e40ad7732fdb82ccc14..55413abbc6e0bf983b94b68c2411dab83a57e2c6 100644 (file)
@@ -151,6 +151,13 @@ try_constant_propagate(const struct gen_device_info *devinfo,
    if (value.file != IMM)
       return false;
 
+   /* 64-bit types can't be used except for one-source instructions, which
+    * higher levels should have constant folded away, so there's no point in
+    * propagating immediates here.
+    */
+   if (type_sz(value.type) == 8 || type_sz(inst->src[arg].type) == 8)
+      return false;
+
    if (value.type == BRW_REGISTER_TYPE_VF) {
       /* The result of bit-casting the component values of a vector float
        * cannot in general be represented as an immediate.