Skip to content

Commit 895b751

Browse files
committed
Fix function jit
1 parent 0e1b031 commit 895b751

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* +----------------------------------------------------------------------+
1717
*/
1818

19-
#include "../../../Zend/zend_types.h"
19+
#include "Zend/zend_types.h"
2020
#include "Zend/zend_type_info.h"
2121
#include "jit/ir/ir.h"
2222
#include "jit/ir/ir_builder.h"
@@ -7570,11 +7570,10 @@ static int zend_jit_bool_jmpznz(zend_jit_ctx *jit, const zend_op *opline, uint32
75707570
op1_addr = ZEND_ADDR_REF_ZVAL(ref);
75717571
}
75727572

7573-
if (Z_MODE(op1_addr) == IS_CONST_ZVAL) {
7574-
zval *op1 = Z_ZV(op1_addr);
7573+
if (Z_MODE(op1_addr) == IS_CONST_ZVAL
7574+
&& (Z_TYPE_P(Z_ZV(op1_addr)) != IS_DOUBLE || !zend_isnan(Z_DVAL_P(Z_ZV(op1_addr))))) {
75757575
/* NAN Value must cause a warning to be emitted */
7576-
// TODO function JIT does not emit warning
7577-
if ((Z_TYPE_P(op1) == IS_DOUBLE && zend_isnan(Z_DVAL_P(op1))) || zend_is_true(op1)) {
7576+
if (zend_is_true(Z_ZV(op1_addr))) {
75787577
always_true = 1;
75797578
} else {
75807579
always_false = 1;

0 commit comments

Comments
 (0)