gh-130415: Narrow types to constants in branches involving specialized comparisons with a constant (GH-144150)

This commit is contained in:
reiden 2026-01-24 18:02:08 +08:00 committed by GitHub
parent 29840247ff
commit 6d972e0104
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 360 additions and 8 deletions

View file

@ -250,6 +250,11 @@ add_op(JitOptContext *ctx, _PyUOpInstruction *this_instr,
#define sym_new_predicate _Py_uop_sym_new_predicate
#define sym_apply_predicate_narrowing _Py_uop_sym_apply_predicate_narrowing
/* Comparison oparg masks */
#define COMPARE_LT_MASK 2
#define COMPARE_GT_MASK 4
#define COMPARE_EQ_MASK 8
#define JUMP_TO_LABEL(label) goto label;
static int