mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
i965: Don't mark dead instructions' sources live.
Removes dead code from glsl-mat-from-int-ctor-03.shader_test. Reported-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
0e49151dcf
commit
48b4e88d3d
2 changed files with 8 additions and 0 deletions
|
|
@ -109,6 +109,10 @@ fs_visitor::dead_code_eliminate()
|
|||
BITSET_CLEAR(flag_live, inst->flag_subreg);
|
||||
}
|
||||
|
||||
/* Don't mark dead instructions' sources as live */
|
||||
if (inst->opcode == BRW_OPCODE_NOP)
|
||||
continue;
|
||||
|
||||
for (int i = 0; i < inst->sources; i++) {
|
||||
if (inst->src[i].file == VGRF) {
|
||||
int var = live_intervals->var_from_reg(inst->src[i]);
|
||||
|
|
|
|||
|
|
@ -150,6 +150,10 @@ vec4_visitor::dead_code_eliminate()
|
|||
BITSET_CLEAR(flag_live, c);
|
||||
}
|
||||
|
||||
/* Don't mark dead instructions' sources as live */
|
||||
if (inst->opcode == BRW_OPCODE_NOP)
|
||||
continue;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (inst->src[i].file == VGRF) {
|
||||
for (unsigned j = 0; j < inst->regs_read(i); j++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue