Personal project · Nov 2026

LLVM 20 Loop Vectorization Analyzer

C++ · LLVM 20 · compilers · Clang · GCC · ScalarEvolution · DependenceAnalysis · lit / FileCheck · GitHub Actions

Why did LLVM leave this loop scalar? A compiler plugin that runs inside clang -O3 just before the loop vectorizer, explains each rejected loop from LLVM's own analyses with a category, the evidence and a source-level fix, checks its answers against LLVM, and repairs one class of blocked loops. 204 lit/FileCheck tests run in GitHub Actions.

Key results
How it works
How it works · runs right before LLVM's vectorizer
Agreement with LLVM's vectorizer
Agreement · per target and benchmark suite
Repair pass speedup
Repair speedup · per kernel and flag set
LLVM 20.1.2 loop-interchange bug
LLVM 20.1.2 bug · fixed in LLVM 21
← All projects Get in touch