summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-08 09:36:48 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-08 09:37:49 +0100
commit1165a9068cbf3c3c24a78b47e0effcf9b90ec5bc (patch)
tree9b257249b67e477387d782d71143ad6735ff16a8
parent0d9935739c3a035f74b54aa518f2497975402864 (diff)
downloadphp-git-1165a9068cbf3c3c24a78b47e0effcf9b90ec5bc.tar.gz
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).
-rw-r--r--ext/opcache/Optimizer/pass3.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c
index fc2cae10d8..fecadbcec5 100644
--- a/ext/opcache/Optimizer/pass3.c
+++ b/ext/opcache/Optimizer/pass3.c
@@ -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)) {