i965/fs: don't propagate 64-bit immediates
authorConnor Abbott <connor.w.abbott@intel.com>
Mon, 3 Aug 2015 21:53:05 +0000 (14:53 -0700)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:05 +0000 (11:25 +0200)
They can only be used with 1-src instructions, which practically (since
we should've constant-propagated away all 1-src instructions with 64-bit
immediates in NIR) means that they must be kept in separate MOV's and
can't be propagated.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp

index 2e8c84fa34e9e3550088c4127d35c859d09035ec..4d727c131d5d956d60f4ede2a43f04bc20a366af 100644 (file)
@@ -508,6 +508,8 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
 
    if (entry->src.file != IMM)
       return false;
+   if (type_sz(entry->src.type) > 4)
+      return false;
    if (entry->saturate)
       return false;