diff options
author | marha <marha@users.sourceforge.net> | 2011-02-07 07:27:49 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-07 07:27:49 +0000 |
commit | 67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9 (patch) | |
tree | ce4c020cfe90ad231c15af77fb3b0933712f05d7 /mesalib/src/glsl/opt_dead_code_local.cpp | |
parent | 5b7cc430132c47f9e4e84fd1830abc6aead39954 (diff) | |
parent | 53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae (diff) | |
download | vcxsrv-67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9.tar.gz vcxsrv-67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9.tar.bz2 vcxsrv-67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9.zip |
svn merge ^/branches/released .
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. */ |