Skip to content

compiler-output-regression: native_owned_typed_views misses vectorization for an unexpected control_flow reason (Linux-only, pre-existing, blocking full-suite-gate) #8489

Closed

Description

@proggeramlug

compiler-output-regression fails its "Gate native-ABI proof compiler output" step on one workload:

native_owned_typed_views
vectorization_expectation:
  observed_missed_reason_kinds: {"call_instruction": 4, "control_flow": 3,
                                 "generic_not_vectorized": 7, "unknown_trip_count": 1}
  unexpected_missed_reason_kinds: ["control_flow"]
  min_vectorized_loops: 0, vectorized_count: 0, passed: false

control_flow is not in that workload's allowed_missed_reason_kinds, so three loops now miss vectorization for a reason the gate has not seen before.

Scope / attribution

Why this is a low-severity gate failure: this workload sets min_vectorized_loops = 0 with scalar_baseline = "allowed: native-owned typed view fixture gates proof records and fallback reasons". It does not require vectorization; the reason list is a change detector. Sibling workloads (native_abi_packet_control, native_pod_layout_constants) already list control_flow as acceptable.

It is, however, blocking the release: compiler-output-regression is one of full-suite-gate's required jobs.

Proposed: widen this workload's allowed_missed_reason_kinds to include control_flow, matching its siblings, with a comment pointing here — and keep this issue open to attribute the codegen change that introduced it. That trades a precise change-detector for an unblocked release, so it should be reverted once the cause is known and either fixed or accepted deliberately.

Activity

  1. proggeramlug commented on Aug 26, 2026

    @proggeramlug
    ContributorAuthor

    Attributed: 40e2ce86d (#8457, "make -Os the default native optimization level"). Recorded in #8854.

    Verdict: legitimate, not a codegen regression. Perry's emitted IR is byte-identical across that commit (same sha256 at 526e0b502, f14a9e262 and 40e2ce86d) — only the clang args changed, -O3 → -Os. The harness's remark pass reuses the compile's own args, so the analysis moved to -Os too, where LLVM declines the SimplifyCFG speculation and if-conversion that previously flattened those branches into selects before the vectorizer. The loops genuinely carry control flow, and vectorizing them would grow code size — exactly what -Os asks for. So #8490's widening was the right call; #8854 only replaces its rationale.

    Three claims in this issue were wrong, and they are why attribution stalled:

    1. Not Linux-only. The gate builds with cargo build -p perry → --perry target/debug/perry (test.yml:1809/:1821) — a debug build. The macOS run that "did not reproduce" used --profile perry-dev (opt-level 1). That is a different profile, not a different OS. It reproduces on macOS with a CI-matching debug build.
    2. Not release-configuration-specific, for the same reason.
    3. Not the string-codegen work. control_flow=3 already at 5876c9cdd, which precedes refactor(stdlib): centralize string header readers #8448/perf(codegen): fuse String.concat arguments into concat chain #8450/fix(ui): replace borrowed runtime strings with owned copies #8453/perf(codegen): append strings through variable cells #8454. Those are exonerated.

    The circularity worth noting: 40e2ce86d is an ancestor of the 3627657c7 attribution baseline. Testing against that baseline could only ever report "pre-existing", which is what sent the search toward the wrong window.

    Separately, this went unnoticed for a reason worth its own fix: the native-ABI step did not execute between Jul 30 and Aug 17, because an earlier step in the same job was failing and a failing run: aborts the rest. Filed as #8855.

    Closing — the cause is identified, the workaround in #8490 is confirmed correct, and the rationale now records why.

  2. proggeramlug commented on Aug 26, 2026

    @proggeramlug
    ContributorAuthor

    Attributed to 40e2ce8 (#8457); rationale corrected in #8854.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions