[llvm] [SCEV] Introduce loop-uniform SCEV classification. (PR #194304)
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 13:01:11 PDT 2026
ZequanWu wrote:
It appears to causing clang crash in chromium build:
```
Instruction does not dominate all uses!
%indvars.iv.i435.i.i = phi i64 [ 0, %for.cond1.preheader.i431.i.i ], [ %indvars.iv.next.i439.i.i, %for.inc28.i438.i.i ]
%smin = call i64 @llvm.smin.i64(i64 %indvar, i64 %indvars.iv.i435.i.i)
clang: /usr/local/google/home/zequanwu/work/chromium/src/third_party/llvm/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8573: bool llvm::LoopVectorizePass::processLoop(Loop *): Assertion `!verifyFunction(*F, &dbgs())' failed.
PLEASE submit a bug report to https://crbug.com in the Tools>LLVM component, run tools/clang/scripts/process_crashreports.py (only if inside Google) to upload crash related files, and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -cc1 -triple x86_64-unknown-linux-gnu -O2 -emit-obj -vectorize-loops -x c crash.ii
1. <eof> parser at end of file
2. Optimizer
3. Running pass "function<eager-inv>(drop-unnecessary-assumes,float2int,lower-constant-intrinsics,loop(loop-rotate<header-duplication;no-prepare-for-lto;check-exit-count>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,drop-unnecessary-assumes,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-arithmetic;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,mergeicmps,expand-memcmp,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;switch-to-arithmetic;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "crash.ii"
4. Running pass "loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>" on function "search_tx_type"
#0 0x00005601d59f1648 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/google/home/zequanwu/work/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang-23+0x55ec648)
./tx_search-b31767.sh: line 1: 186000 Aborted (core dumped) clang "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-O2" "-emit-obj" "-vectorize-loops" "-x" "c" crash.ii
```
Attached preprocessed source. I failed to create an ir repro because if use `clang -O0 -emit-llvm ...`, neither `opt -O2` nor `llc -O2`
[Uploading crash.zip…]()
repros this crash.
https://github.com/llvm/llvm-project/pull/194304
More information about the llvm-commits
mailing list