Compiler Explorer: https://godbolt.org/z/eEqc4oeET Note: - works: 20.1.0 and earlier - fails: trunk, only at -O{s,2} - perhaps related: https://github.com/llvm/llvm-project/issues/153946 ``` [516] % clangtk -v clang version 22.0.0git (https://github.com/llvm/llvm-project.git fc6299065794d05bcab8f6bb9628441b3d071131) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /local/home/suz/suz-local/software/local/clang-trunk/bin Build config: +assertions Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12 Candidate multilib: .;@m64 Selected multilib: .;@m64 Found CUDA installation: /usr/local/cuda, version 12.1 [517] % [517] % clangtk -O2 small.c; ./a.out [518] % [518] % clangtk -O2 -mllvm -force-vector-width=1 -mllvm -force-vector-interleave=2 small.c [519] % ./a.out Aborted [520] % cat small.c int a, b; int f(int g) { a = 0; for (; a < 32; a++) if (g >> a & 1) return a; return 0; } int main() { if (f(b-2) != 1) __builtin_abort(); return 0; } ```