diff options
author | marha <marha@users.sourceforge.net> | 2011-02-07 07:14:23 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-07 07:14:23 +0000 |
commit | 53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae (patch) | |
tree | 8269551248a104f428f6245fba51d659775489e2 /mesalib/src/glsl/opt_dead_code_local.cpp | |
parent | 39522c7dc587b335b0e0e00fc68f98e6a7a5c7bd (diff) | |
download | vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.tar.gz vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.tar.bz2 vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.zip |
mesa git update 7 Feb 2011
Diffstat (limited to 'mesalib/src/glsl/opt_dead_code_local.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_dead_code_local.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/mesalib/src/glsl/opt_dead_code_local.cpp b/mesalib/src/glsl/opt_dead_code_local.cpp index 88dcdc251..f67b46337 100644 --- a/mesalib/src/glsl/opt_dead_code_local.cpp +++ b/mesalib/src/glsl/opt_dead_code_local.cpp @@ -131,15 +131,8 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) var = ir->lhs->variable_referenced(); assert(var); - bool always_assign = true; - if (ir->condition) { - ir_constant *condition = ir->condition->as_constant(); - if (!condition || !condition->value.b[0]) - always_assign = false; - } - /* Now, check if we did a whole-variable assignment. */ - if (always_assign && (ir->whole_variable_written() != NULL)) { + if (!ir->condition && (ir->whole_variable_written() != NULL)) { /* We did a whole-variable assignment. So, any instruction in * the assignment list with the same LHS is dead. */ |