[llvm] [LV] Vectorize conditional scalar assignments (PR #158088)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 15 07:06:28 PST 2026
mstorsjo wrote:
This is causing miscompilations/crashes for me.
When I first build the latest Clang (with a preexisting GCC, reprodcued with both GCC 9 in Ubuntu 20.04 and GCC 11 in Ubuntu 22.04), then use that for instrumenting and doing PGO training of Clang, then I hit crashes when building LLVM/Clang optimized with that profile: https://github.com/mstorsjo/llvm-mingw/actions/runs/21016000055/job/60433933445
I have reproduced the same crashes when doing the same PGO build chain on both aarch64 and x86_64. I've bisected it down to this commit; before this change, things work.
Unfortunately I don't have much more details about the issue itself; in one of the crashes I get the following info:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Running pass "function<eager-inv>(drop-unnecessary-assumes,float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,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>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O3>,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,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 "lib/libLLVMARMCodeGen.a(Thumb1FrameLowering.cpp.o at 8305892)"
1. Running pass "loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>" on function "_ZNK4llvm19Thumb1FrameLowering12emitPrologueERNS_15MachineFunctionERNS_17MachineBasicBlockE"
```
It's possible to reproduce this crash in the PGO build chain, by checking out https://github.com/mstorsjo/llvm-mingw, then within this directory, check out `llvm-project` with the desired revision to test, and do `./build-all.sh --full-pgo ~/clang-temp-stage1 ~/clang-temp-pgo`, which does all of the building and ends up hitting the error.
Given these issues, I believe there are grounds to revert this patch, even if I don't have a small reproducer at hand.
https://github.com/llvm/llvm-project/pull/158088
More information about the llvm-commits
mailing list