[llvm] [AArch64][SVE] Pair SVE fill/spill into LDP/STP with -msve-vector-bits=128. (PR #134068)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 06:00:29 PDT 2025


DavidSpickett wrote:

Also fails to compile some flang tests when testing the stage 1 flang: https://lab.llvm.org/buildbot/#/builders/17/builds/7157

Due to mixed up parallel builds' logs, these may not be from the same crash but judging by the amount of crashes, it's likely to be the same reason for all of them anyway:
```
Opcode has unknown scale!
UNREACHABLE executed at ../llvm/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:4530!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.  Program arguments: /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -D NDEBUG -I /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/include/flang -I /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-execute-regression__array_constructor_type_6_f03.wd -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu neoverse-512tvb -target-feature +outline-atomics -target-feature +v8.4a -target-feature +aes -target-feature +bf16 -target-feature +ccdp -target-feature +ccidx -target-feature +ccpp -target-feature +complxnum -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +fullfp16 -target-feature +i8mm -target-feature +jsconv -target-feature +lse -target-feature +neon -target-feature +pauth -target-feature +perfmon -target-feature +rand -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +sm4 -target-feature +spe -target-feature +ssbs -target-feature +sve -vectorize-loops -vectorize-slp -fversion-loops-for-stride -module-dir gfortran-regression-execute-regression__array_constructor_type_6_f03.wd -resource-dir /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/lib/clang/21 -mframe-pointer=non-leaf -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false -O3 -o CMakeFiles/gfortran-regression-execute-regression__array_constructor_type_6_f03.dir/array_constructor_type_6.f03.o -x fflang-219: 5-warningc: pargument unused during compilation: '-mllvm -scalable-vectorization=preferred' [-Wunused-command-line-argument]p
-input /home/tcwgflang-21-: bwarningu: iargument unused during compilation: '-mllvm -treat-scalable-fixed-error-as-warning=false' [-Wunused-command-line-argument]l
dbot/worker/clang-aarch64-sve-vla/test/test-suite/Fortran/gfortran/regression/array_constructor_type_6.f03
1.  Running pass 'Function Pass Manager' on module 'FIRModule'.
2.  Running pass 'AArch64 load / store optimization pass' on function '@_QQmain'
<...>
 #0 0x0000c8c463dfdd10 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6d6dd10)
 #1 0x0000c8c463dfbc0c llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6d6bc0c)
 #2 0x0000c8c463dfe39c SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000e8eb8fa2c8f8 (linux-vdso.so.1+0x8f8)
 #4 0x0000e8eb8f4cf1f0 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000e8eb8f48a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #6 0x0000e8eb8f477130 abort ./stdlib/abort.c:81:7
 #7 0x0000c8c463d71db8 (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6ce1db8)
 #8 0x0000c8c4625db518 (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x554b518)
 #9 0x0000c8c4627bbb38 (anonymous namespace)::AArch64LoadStoreOpt::findMatchingInsn(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, (anonymous namespace)::LdStPairFlags&, unsigned int, bool) AArch64LoadStoreOptimizer.cpp:0:0
#10 0x0000c8c4627b9738 (anonymous namespace)::AArch64LoadStoreOpt::tryToPairLdStInst(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) AArch64LoadStoreOptimizer.cpp:0:0
#11 0x0000c8c4627b73dc (anonymous namespace)::AArch64LoadStoreOpt::optimizeBlock(llvm::MachineBasicBlock&, bool) AArch64LoadStoreOptimizer.cpp:0:0
#12 0x0000c8c4627b542c (anonymous namespace)::AArch64LoadStoreOpt::runOnMachineFunction(llvm::MachineFunction&) AArch64LoadStoreOptimizer.cpp:0:0
#13 0x0000c8c466aa7cb4 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x9a17cb4)
#14 0x0000c8c468fdd9c8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0xbf4d9c8)
#15 0x0000c8c468fe574c llvm::FPPassManager::runOnModule(llvm::Module&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0xbf5574c)
#16 0x0000c8c468fde354 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0xbf4e354)
#17 0x0000c8c463e4d4c0 generateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine&, llvm::TargetMachine&, Fortran::frontend::BackendActionTy, llvm::Module&, Fortran::frontend::CodeGenOptions const&, llvm::raw_pwrite_stream&) FrontendActions.cpp:0:0
#18 0x0000c8c463e4cf8c Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6dbcf8c)
#19 0x0000c8c463e4083c Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6db083c)
#20 0x0000c8c463e2c214 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6d9c214)
#21 0x0000c8c463e44ab8 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x6db4ab8)
#22 0x0000c8c4625bb4b0 fc1_main(llvm::ArrayRef<char const*>, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x552b4b0)
#23 0x0000c8c4625ba338 main (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang+0x552a338)
#24 0x0000e8eb8f4773fc __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#25 0x0000e8eb8f4774cc call_init ./csu/../csu/libc-start.c:128:20
#26 0x0000e8eb8f4774cc __libc_start_main ./csu/../csu/libc-start.c:379:5
```
That's the same assert failure as we saw in the 2nd stage errors. So this would give you an easier way to reproduce it.

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


More information about the llvm-commits mailing list