[llvm] [VectorCombine] foldShuffleChainsToReduce - add support for partial vector reductions (PR #195119)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 06:31:26 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-ubuntu-x-aarch64-pauthtest` running on `as-builder-11` while building `llvm` at step 16 "build-default-test-suite".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/227/builds/1731

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 16 (build-default-test-suite) failure: cmake (failure)
...
6.487 [4237/130/1787] Linking C executable SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-941101-1
6.489 [4236/130/1788] Building C object SingleSource/Regression/C/gcc-c-torture/execute/CMakeFiles/GCC-C-execute-950628-1.dir/950628-1.c.o
6.491 [4235/130/1789] Building C object SingleSource/Regression/C/gcc-c-torture/execute/CMakeFiles/GCC-C-execute-950704-1.dir/950704-1.c.o
6.493 [4234/130/1790] Linking C executable SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-931102-1
6.495 [4233/130/1791] Building C object SingleSource/Regression/C/gcc-c-torture/execute/CMakeFiles/GCC-C-execute-950706-1.dir/950706-1.c.o
6.497 [4232/130/1792] Linking C executable SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-931004-4
6.498 [4231/130/1793] Linking C executable SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-931004-8
6.499 [4230/130/1794] Building C object SingleSource/Regression/C/gcc-c-torture/execute/CMakeFiles/GCC-C-execute-950929-1.dir/950929-1.c.o
6.503 [4229/130/1795] Building CXX object SingleSource/Benchmarks/Shootout-C++/CMakeFiles/Shootout-C++-reversefile.dir/reversefile.cpp.o
6.504 [4228/130/1796] Building CXX object SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o
FAILED: SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o 
/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/llvm-test-suite/tools/timeit --summary SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o.time /home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang++ -DNDEBUG  --target=aarch64-linux-pauthtest -march=armv8l+pauth -O2    -O3 -DNDEBUG -std=gnu++17   -w -Werror=date-time -mllvm -tail-folding-policy=must-fold-tail -mllvm -force-tail-folding-style=data -MD -MT SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o -MF SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o.d -o SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o -c /home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/llvm-test-suite/SingleSource/UnitTests/Vectorizer/recurrences.cpp
clang++: /home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/llvm-project/llvm/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::FixedVectorType; From = llvm::VectorType]: Assertion `Val && "isa<> used on a null pointer"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang++ -DNDEBUG --target=aarch64-linux-pauthtest -march=armv8l+pauth -O2 -O3 -DNDEBUG -std=gnu++17 -w -Werror=date-time -mllvm -tail-folding-policy=must-fold-tail -mllvm -force-tail-folding-style=data -MD -MT SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o -MF SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o.d -o SingleSource/UnitTests/Vectorizer/CMakeFiles/tfactivelanemask-recurrences.dir/recurrences.cpp.o -c /home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/llvm-test-suite/SingleSource/UnitTests/Vectorizer/recurrences.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(drop-unnecessary-assumes,float2int,lower-constant-intrinsics,chr,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>,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,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 "/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/llvm-test-suite/SingleSource/UnitTests/Vectorizer/recurrences.cpp"
4.	Running pass "vector-combine" on function "_ZNSt3__110__function6__funcIZ4mainE3$_3FvPjS3_jEEclB9nqe230000EOS3_S6_Oj"
 #0 0x000064a83b7813b2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x237f3b2)
 #1 0x000064a83b77dfdc llvm::sys::RunSignalHandlers() (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x237bfdc)
 #2 0x000064a83b77ea6d llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x237ca6d)
 #3 0x000064a83b6b2b18 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #4 0x00007e2ebe645330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #5 0x00007e2ebe69eb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
 #6 0x00007e2ebe64527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
 #7 0x00007e2ebe6288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #8 0x00007e2ebe62881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
 #9 0x00007e2ebe63b517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
#10 0x000064a83a1b5b9a decltype(auto) llvm::cast<llvm::FixedVectorType, llvm::VectorType>(llvm::VectorType*) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0xdb3b9a)
#11 0x000064a83a306a24 llvm::AArch64TTIImpl::getShuffleCost(llvm::TargetTransformInfo::ShuffleKind, llvm::VectorType*, llvm::VectorType*, llvm::ArrayRef<int>, llvm::TargetTransformInfo::TargetCostKind, int, llvm::VectorType*, llvm::ArrayRef<llvm::Value const*>, llvm::Instruction const*) const (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0xf04a24)
#12 0x000064a83a7fd2c7 llvm::TargetTransformInfo::getShuffleCost(llvm::TargetTransformInfo::ShuffleKind, llvm::VectorType*, llvm::VectorType*, llvm::ArrayRef<int>, llvm::TargetTransformInfo::TargetCostKind, int, llvm::VectorType*, llvm::ArrayRef<llvm::Value const*>, llvm::Instruction const*) const (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x13fb2c7)
#13 0x000064a83d73176c (anonymous namespace)::VectorCombine::foldShuffleChainsToReduce(llvm::Instruction&) VectorCombine.cpp:0:0
#14 0x000064a83d743360 llvm::VectorCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x4341360)
#15 0x000064a83ca48795 llvm::detail::PassModel<llvm::Function, llvm::VectorCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x3646795)
#16 0x000064a83b1d2817 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x1dd0817)
#17 0x000064a83bbaf775 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x27ad775)
#18 0x000064a83b1d0a54 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x1dcea54)
#19 0x000064a83bbafa85 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x27ada85)
#20 0x000064a83b1d1697 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x1dcf697)
#21 0x000064a83bbbe12a (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#22 0x000064a83bbc1406 (anonymous namespace)::EmitAssemblyHelper::emitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) BackendUtil.cpp:0:0
#23 0x000064a83bbc21e6 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x27c01e6)
#24 0x000064a83c2927d0 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x2e907d0)
#25 0x000064a83df3e1ec clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x4b3c1ec)
#26 0x000064a83c6095e7 clang::FrontendAction::Execute() (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x32075e7)
#27 0x000064a83c58b8b0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x31898b0)
#28 0x000064a83c70575e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/buildbot/worker/as-builder-11/x-aarch64-pauthtest/build/bin/clang+++0x330375e)

```

</details>

https://github.com/llvm/llvm-project/pull/195119


More information about the llvm-commits mailing list