nir: Don't bail too early in lower_mem_constant_vars
[mesa.git] / src / compiler / glsl / ir_equals.cpp
index 81980eb50a7588d7cee8ea6cd97c5c5e8a2b6c04..f7359e23904d962fccb1ca54ec04fbb5755f0b78 100644 (file)
@@ -202,7 +202,7 @@ ir_expression::equals(const ir_instruction *ir, enum ir_node_type ignore) const
    if (operation != other->operation)
       return false;
 
-   for (unsigned i = 0; i < get_num_operands(); i++) {
+   for (unsigned i = 0; i < num_operands; i++) {
       if (!operands[i]->equals(other->operands[i], ignore))
          return false;
    }