Skip to content

test: guard narrow TCMP constructors and mandatory LB0 codegen - #293

Merged
VV0003 merged 2 commits into
linxfrom
fix/llvm-138-narrow-tcmp-regression
Oct 26, 2026
Merged

VV0003 merged 2 commits into
linxfrom
fix/llvm-138-narrow-tcmp-regression

Conversation

@VV0003

@VV0003 VV0003 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Completes compiler/API regression coverage for LinxISA/llvm-project#138 on top of merged #291.

  • Cover [32,1]/[64,1] two-runtime-dimension and static-column constructors, S32/U32 sources, all six comparison modes.
  • Check IR geometry, final target assembly and object compilation, plus six compile-fail physical/valid shape and layout cases.
  • Add the focused regression to the required gate and document the narrow-carrier contract.

Root cause and companion LLVM fix

Machine-code inspection found a real LLVM bug: mandatory non-transport LB0=1 remained a register operand while its defining ADDI was erased. LLVM commit f3855334d201 on dev-llvm15_56 now folds it to explicit C.B.DIMI 1, ->lb0 instead. Optional default dimensions retain elision. This is a functional codegen fix, not a disassembly-only change. #291 already rejects incompatible physical TCMP/TSEL schemas.

ISA basis

PTO normative asl/tile/elementwise-tile-tile/logical/TCMP.asl and asl/tile/model/legality/dtype-layout.asl: logical shape includes physical rows/columns, valid rows/columns and layout; non-transport LB0 is required. Runtime valid-region equality/range remains the caller contract.

Validation

  • Source compile / IR: [32,1], [64,1], 6 comparison modes and equal-width S32/U32 pass; 6 incompatible-schema cases rejected.
  • Final assembly / actual object disassembly: required LB0=1 is explicit; LLVM object FileCheck and TileOP final-assembly tests fail before the LLVM fix and pass after it.
  • Focused Python regression: 4/4 pass.
  • LLVM CodeGen+MC: 311 pass, 1 expected failure, 52 historical failures; failure set matches the pristine baseline exactly (zero new failures).
  • All 22 Python suites rerun with the patched compiler: 20 suites pass (engine contract 59/59); two unrelated historical suites fail.
  • Pristine c150817 reproduces unrelated test_element_tile_api.test_reject_unsupported_dtype and test_weight_tload_contract.test_weight_bundle_uses_shared_nk_contract failures.
  • git diff --check pass. No SSM end-to-end execution is claimed.

Closes LinxISA/llvm-project#138

@VV0003
VV0003 merged commit 1153ea6 into linx Oct 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant