From df1439241a660376be6357fa32cd1eda0b75bca7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 19 Feb 2018 21:38:10 +0100 Subject: [PATCH] Simplify code If operator overloading is ignored tmp will be 0 and we can still use |=. No need to separate this into two cases. --- ext/opcache/Optimizer/zend_inference.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 08ae51667e..346958b651 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2161,11 +2161,7 @@ static uint32_t binary_op_result_type( * handling */ break; case ZEND_MOD: - if (ZEND_OPTIMIZER_IGNORE_OVERLOADING & optimization_level) { - tmp = MAY_BE_LONG; - } else { - tmp |= MAY_BE_LONG; - } + tmp |= MAY_BE_LONG; /* Division by zero results in an exception, so it doesn't need any special handling */ break; case ZEND_BW_OR: @@ -2180,11 +2176,7 @@ static uint32_t binary_op_result_type( break; case ZEND_SL: case ZEND_SR: - if (ZEND_OPTIMIZER_IGNORE_OVERLOADING & optimization_level) { - tmp = MAY_BE_LONG; - } else { - tmp |= MAY_BE_LONG; - } + tmp |= MAY_BE_LONG; break; case ZEND_CONCAT: case ZEND_FAST_CONCAT: -- 2.50.1