From 6847071f651d8b1578a2eac62bda59d92fba6d47 Mon Sep 17 00:00:00 2001 From: BREW <81044362+b-re-w@users.noreply.github.com> Date: Sun, 25 Oct 2026 16:22:30 +0900 Subject: [PATCH] Fix: no NEON vector loop for numpy operations, which report FP flags per element (CI red since #270) --- python-multiplatform-ksp/src/main/python/typedpython/cgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-multiplatform-ksp/src/main/python/typedpython/cgen.py b/python-multiplatform-ksp/src/main/python/typedpython/cgen.py index 9a5a5124..03ba4ad4 100644 --- a/python-multiplatform-ksp/src/main/python/typedpython/cgen.py +++ b/python-multiplatform-ksp/src/main/python/typedpython/cgen.py @@ -1997,8 +1997,9 @@ def ok(e): return (a is not None and a.buffer and a.type is Type.F64_ARRAY and at_var(e.index, e.proven)) if isinstance(e, ir.BinOp): + # a numpy operation reports FP flags per element (tp_np_f64); NEON lanes do not return (e.op in (ir.BinOpKind.ADD, ir.BinOpKind.SUB, ir.BinOpKind.MUL) - and ok(e.left) and ok(e.right)) + and not e.np and ok(e.left) and ok(e.right)) if isinstance(e, ir.UnaryOp): return e.op is ir.UnaryOpKind.NEG and ok(e.operand) return False