Skip to content

Commit 9ae702c

Browse files
committed
simplify: revert Float/Long/Bool comparison paths (ARM64 regression)
Bisect confirmed test_container_equality fails on ARM64 with these paths but passes without. Root cause TBD — likely hardcoded PrimitiveCompareOp values or Float/Long compare emit issue on aarch64. Keep only None==None path which is verified on both architectures.
1 parent 25c2385 commit 9ae702c

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

Python/jit/hir/simplify_c.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -163,35 +163,6 @@ void *simplify_compare_c(SimplifyEnv *env, const void *instr) {
163163
}
164164
}
165165

166-
/* Bool == Bool or Bool != Bool → PrimitiveCompare + PrimitiveBoxBool */
167-
HirType t_bool = HIR_TYPE_SIMPLE(0x00000000002ULL, HIR_TYPE_LIFETIME_TOP);
168-
if (hir_type_is_subtype(left_type, t_bool) &&
169-
hir_type_is_subtype(right_type, t_bool) &&
170-
(op == 2 || op == 3)) {
171-
int32_t prim_op = (op == 2) ? 4 : 5;
172-
simplify_env_emit_use_type(env, left, t_bool);
173-
simplify_env_emit_use_type(env, right, t_bool);
174-
void *result = simplify_env_emit_primitive_compare(env, prim_op, left, right);
175-
return simplify_env_emit_primitive_box_bool(env, result);
176-
}
177-
178-
HirType t_float_exact = HIR_TYPE_SIMPLE(0x00000008000ULL, HIR_TYPE_LIFETIME_TOP);
179-
HirType t_long_exact = HIR_TYPE_SIMPLE(0x00000010000ULL, HIR_TYPE_LIFETIME_TOP);
180-
181-
/* Float comparison */
182-
if (hir_type_is_subtype(left_type, t_float_exact) &&
183-
hir_type_is_subtype(right_type, t_float_exact) &&
184-
op != 6 && op != 7 && op != 10) {
185-
return simplify_env_emit_float_compare(env, op, left, right);
186-
}
187-
188-
/* Long comparison */
189-
if (hir_type_is_subtype(left_type, t_long_exact) &&
190-
hir_type_is_subtype(right_type, t_long_exact) &&
191-
op != 6 && op != 7 && op != 10) {
192-
return simplify_env_emit_long_compare(env, op, left, right);
193-
}
194-
195166
return NULL;
196167
}
197168

0 commit comments

Comments
 (0)