[ClangIR] Upstream Progress Report - May 2026

Follow-up to the April report. All numbers below are from upstream main at commit 7a3865728be1 (“[AMDGPU][GlobalISel] RegBankLegalize rules for permlane_(bcast|up|down|xor|idx_gen) intrinsics (#195583)”, 2026-05-04), compiled at -O2. x86_64 results run natively on Linux.

Test Suite April (x86_64) May (x86_64) Δ
SingleSource 92.10% (1702/1848) 96.0% (1774/1848) +72 / +3.9pp
MultiSource 77.61% (156/201) 91.0% (183/201) +27 / +13.4pp
SPEC CINT 2017 4/10 5/10 +1
SPEC CFP 2017 3/8 4/8 +1
libcxx (std/) 46.1% (4006/8695) 73.6% (6449/8759) +2443 / +27.5pp
Self-hosting (per-TU) 2.1% (111/5272) 4.5% (239/5272) +128 / +2.4pp
CIR Unit Tests 99.0% (696/703)

Big jumps across the board — most striking on libcxx (+27.5pp) where __builtin_verbose_trap (the top April blocker, 2,373 hits) now reports zero failures, and on MultiSource (+13.4pp). Inherited constructor blockers (#2 in April) are also gone from the failure logs.

Self-Hosting

Stage-2 bootstrap (-fclangir-built clang recompiling LLVM/clang), per-TU measurement, cascading dep failures preserved.

April May
Targets succeeded 111 239 (+128, +115%)
Total graph 5,272 5,272
Pass rate 2.1% 4.5%

Successful compiles more than doubled. April’s dominant blocker (inherited constructor, 67% of failures) is gone; the new bottleneck is ~135 distinct CIR crashes, dominated by llvm/lib/Support/APFixedPoint.cpp which cascades to 4,173 dependents. Real per-TU NYI hits are down to ~26 (thread_local, TLS dynamic globals, init requires dtor, plus a few Sema rejections).

Refreshed Top-Priority Issues (x86_64)

# Category Hits Where vs April
1 CIR module verifier rejects pre-pass IR 335 (libcxx 328, selfhost 22 — overlap) libcxx, selfhost NEW
2 appendParameterTypes: hasExtParameterInfos / extra parameter info 271 libcxx NEW
3 goto in cleanup scope is not yet implemented 85 (libcxx 42, testsuite 43) All RELATED to April #4
4 emitCXXDeleteExpr: throwing destructor 63 testsuite (SingleSource/MultiSource/SPEC) NEW
5 isa<TypedValue<IntType>> cast assertion (selfhost crash) 43 selfhost NEW
6 __builtin_assume_dereferenceable 33 libcxx NEW
7 unsupported type for undef rvalue 33 (libcxx 31, testsuite 2) libcxx, testsuite DOWN — was April-ARM #5
8 X86 vector reduce builtins (reduce_or/and/xor) 26 libcxx NEW
9 C++ constructors static var context 23 testsuite NEW
10 UNREACHABLE @ ValueTypes.cpp:254 17 SingleSource NEW

Items that dropped out of the April top-7:

  • __builtin_verbose_trap (April #1, 2,373 hits) — 0 hits in May libcxx logs.
  • Inherited constructor (April #2, 67% of selfhost) — 0 hits in May selfhost / libcxx logs.
  • Dynamic-length array / partial array cleanups (April #3) — 0 hits matched.
  • Replace call with mismatched types (April #5) — survives as applyReplacements: verifyPointerTypeArgs (4 hits in selfhost).
  • AggExprEmitter::VisitArrayInitLoopExpr (April #6) — 0 hits.
  • pushFullExprCleanup conditional branch (April #7) — survives as deferredConditionalCleanupStack.empty() assertion (14 total: 7 selfhost + 7 testsuite).

Blockers

  1. llvm/lib/Support/APFixedPoint.cpp crashes CIR codegen and cascades to 4,173 dependent build targets — the largest selfhost blocker. Fixing it could lift the per-TU selfhost number dramatically.
  2. UnicodeNameToCodepointGenerated.cpp hangs / times out under CIR — suggests an O(N²)-or-worse path triggered by the Unicode name table’s giant initializer.
  3. CIR module verifier rejects pre-pass IR (335 hits in libcxx) — likely a verifier/builder mismatch; one fix could unblock a large libcxx batch.
  4. ARM64 numbers are not included in this update — a fresh sweep is pending and will be added in a follow-up post.

Questions, corrections, or contributions are welcome.

12 Likes