i965/vec4: Fix DCE for VEC4_OPCODE_SET_{LOW,HIGH}_32BIT
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 24 Aug 2016 09:21:57 +0000 (11:21 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:50 +0000 (11:26 +0100)
commit553700cf55712ae7269ec4225310a2bf0539f64e
treeddc00de4dfd0754fa39305f15ccbdc58df221f81
parent54b998e0e488189307d2614fe56a3b78b442d316
i965/vec4: Fix DCE for VEC4_OPCODE_SET_{LOW,HIGH}_32BIT

These align1 opcodes do partial writes of 64-bit data. The problem is that we
want to use them to write on the same register to implement packDouble2x32 and
from the point of view of DCE, since both opcodes write to the same register,
only the last one stands and decides to eliminate the first, which is
not correct, so prevent this from happening.

v2: Make a helper in vec4_instruction to know if the instruction is an
    align1 partial write. This will come in handy when we implement a
    simd splitting pass in a later patch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_ir_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp