Skip to content

Commit fb0f8dc

Browse files
committed
Refine narrowing checks
1 parent ceaf091 commit fb0f8dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/optimizer_symbols.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,8 @@ _Py_uop_sym_apply_predicate_narrowing(JitOptContext *ctx, JitOptRef ref, bool br
872872
JitOptRef lhs_ref = PyJitRef_Wrap(allocation_base(ctx) + pred.lhs);
873873
JitOptRef rhs_ref = PyJitRef_Wrap(allocation_base(ctx) + pred.rhs);
874874

875-
bool lhs_is_const = _Py_uop_sym_is_safe_const(ctx, lhs_ref);
876-
bool rhs_is_const = _Py_uop_sym_is_safe_const(ctx, rhs_ref);
875+
bool lhs_is_const = _Py_uop_sym_is_const(ctx, lhs_ref);
876+
bool rhs_is_const = _Py_uop_sym_is_const(ctx, rhs_ref);
877877

878878
if (pred.kind == JIT_PRED_IS && (lhs_is_const || rhs_is_const)) {
879879
JitOptRef subject_ref = lhs_is_const ? rhs_ref : lhs_ref;
@@ -884,7 +884,7 @@ _Py_uop_sym_apply_predicate_narrowing(JitOptContext *ctx, JitOptRef ref, bool br
884884
return;
885885
}
886886
_Py_uop_sym_set_const(ctx, subject_ref, const_val);
887-
assert(_Py_uop_sym_is_safe_const(ctx, subject_ref));
887+
assert(_Py_uop_sym_is_const(ctx, subject_ref));
888888
}
889889
}
890890

0 commit comments

Comments
 (0)