Skip to content

Commit

Permalink
Don't swap operands of ZEND_MUL
Browse files Browse the repository at this point in the history
If this is used with operator overloading, then the operation does
not necessarily commute (for example, matrix multiplication).
  • Loading branch information
nikic committed Jan 8, 2019
1 parent 0d99357 commit 1165a90
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ext/opcache/Optimizer/pass3.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ void zend_optimizer_pass3(zend_op_array *op_array)
if ((opline->op2_type & (IS_VAR | IS_CV))
&& opline->op2.var == next_opline->op1.var &&
(opline->opcode == ZEND_ADD ||
opline->opcode == ZEND_MUL ||
opline->opcode == ZEND_BW_OR ||
opline->opcode == ZEND_BW_AND ||
opline->opcode == ZEND_BW_XOR)) {
Expand Down

0 comments on commit 1165a90

Please sign in to comment.