mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
i965/vec4: prevent copy-propagation from values with a different type size
Because the meaning of the swizzles and writemasks involved is different, so replacing the source would lead to different semantics. Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
0fec5e9867
commit
70cc6b0a02
1 changed files with 7 additions and 0 deletions
|
|
@ -324,6 +324,13 @@ try_copy_propagate(const struct gen_device_info *devinfo,
|
|||
value.file != ATTR)
|
||||
return false;
|
||||
|
||||
/* If the type of the copy value is different from the type of the
|
||||
* instruction then the swizzles and writemasks involved don't have the same
|
||||
* meaning and simply replacing the source would produce different semantics.
|
||||
*/
|
||||
if (type_sz(value.type) != type_sz(inst->src[arg].type))
|
||||
return false;
|
||||
|
||||
if (devinfo->gen >= 8 && (value.negate || value.abs) &&
|
||||
is_logic_op(inst->opcode)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue