[Mesa-dev] [PATCH 66/95] i965/vec4: don't constant propagate 64-bit immediates

Iago Toral Quiroga itoral at igalia.com
Tue Jul 19 10:41:03 UTC 2016


From: Connor Abbott <connor.w.abbott at intel.com>

v2: Also check if the instruction source target is 64-bit. (Samuel)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 73abd57..29a62c1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -149,6 +149,13 @@ try_constant_propagate(const struct brw_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.
-- 
2.7.4



More information about the mesa-dev mailing list