Skip to content

Commit 1165a90

Browse files
committed
Don't swap operands of ZEND_MUL
If this is used with operator overloading, then the operation does not necessarily commute (for example, matrix multiplication).
1 parent 0d99357 commit 1165a90

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

ext/opcache/Optimizer/pass3.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ void zend_optimizer_pass3(zend_op_array *op_array)
9393
if ((opline->op2_type & (IS_VAR | IS_CV))
9494
&& opline->op2.var == next_opline->op1.var &&
9595
(opline->opcode == ZEND_ADD ||
96-
opline->opcode == ZEND_MUL ||
9796
opline->opcode == ZEND_BW_OR ||
9897
opline->opcode == ZEND_BW_AND ||
9998
opline->opcode == ZEND_BW_XOR)) {

0 commit comments

Comments
 (0)