MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

OpenBLAS build failure on CLANGARM64

Open jeremyd2019 opened this issue 1 year ago • 9 comments

after #13124

Error on CLANGARM64:

2022-09-18T17:36:39.8582419Z FAILED: kernel/CMakeFiles/kernel.dir/CMakeFiles/dtrsm_kernel_LN.c.obj 
2022-09-18T17:36:39.8594226Z C:\msys64\clangarm64\bin\clang.exe  -IC:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21 -IC:/M/mingw-w64-openblas/src/build-CLANGARM64-32 -DHAVE_C11 -DMS_ABI -Wall -DSMP_SERVER -DMAX_CPU_NUMBER=64 -DMAX_PARALLEL_NUMBER=1 -DNO_AFFINITY -DVERSION="\"0.3.21\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 -O3 -DNDEBUG -MD -MT kernel/CMakeFiles/kernel.dir/CMakeFiles/dtrsm_kernel_LN.c.obj -MF kernel\CMakeFiles\kernel.dir\CMakeFiles\dtrsm_kernel_LN.c.obj.d -o kernel/CMakeFiles/kernel.dir/CMakeFiles/dtrsm_kernel_LN.c.obj -c C:/M/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dtrsm_kernel_LN.c
2022-09-18T17:36:39.8606200Z In file included from C:/M/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dtrsm_kernel_LN.c:11:
2022-09-18T17:36:39.8612214Z In file included from C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/kernel/arm64/../generic/trsm_kernel_LN.c:39:
2022-09-18T17:36:39.8617697Z In file included from C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common.h:466:
2022-09-18T17:36:39.8624037Z C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common_arm64.h:106:65: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
2022-09-18T17:36:39.8628825Z   __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
2022-09-18T17:36:39.8632081Z                                                                 ^
2022-09-18T17:36:39.8636387Z C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common_arm64.h:106:30: note: use constraint modifier "w"
2022-09-18T17:36:39.8639790Z   __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
2022-09-18T17:36:39.8642236Z                              ^~
2022-09-18T17:36:39.8667980Z                              %w0
2022-09-18T17:36:39.8673502Z PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
2022-09-18T17:36:39.8677408Z Stack dump:
2022-09-18T17:36:39.8688157Z 0.	Program arguments: C:\\msys64\\clangarm64\\bin\\clang.exe -IC:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21 -IC:/M/mingw-w64-openblas/src/build-CLANGARM64-32 -DHAVE_C11 -DMS_ABI -Wall -DSMP_SERVER -DMAX_CPU_NUMBER=64 -DMAX_PARALLEL_NUMBER=1 -DNO_AFFINITY -DVERSION=\"0.3.21\" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 -O3 -DNDEBUG -MD -MT kernel/CMakeFiles/kernel.dir/CMakeFiles/dtrsm_kernel_LN.c.obj -MF kernel\\CMakeFiles\\kernel.dir\\CMakeFiles\\dtrsm_kernel_LN.c.obj.d -o kernel/CMakeFiles/kernel.dir/CMakeFiles/dtrsm_kernel_LN.c.obj -c C:/M/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dtrsm_kernel_LN.c
2022-09-18T17:36:39.8696246Z 1.	<eof> parser at end of file
2022-09-18T17:36:39.8698642Z 2.	Code generation
2022-09-18T17:36:39.8703481Z 3.	Running pass 'Function Pass Manager' on module 'C:/M/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dtrsm_kernel_LN.c'.
2022-09-18T17:36:39.8708334Z 4.	Running pass 'Greedy Register Allocator' on function '@dtrsm_kernel_LN'
2022-09-18T17:36:39.8711382Z Exception Code: 0xC0000005
2022-09-18T17:36:39.8717052Z #0 0x00007ffd7a1c3adc llvm::LiveRange::getNextValue(llvm::SlotIndex, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ull, 4096ull, 128ull>&) (C:\msys64\clangarm64\bin\libLLVM-15.dll+0x3f3adc)
2022-09-18T17:36:39.8722234Z #1 0x00007ffd7a3ca024 llvm::RegAllocBase::postOptimization() (C:\msys64\clangarm64\bin\libLLVM-15.dll+0x5fa024)
2022-09-18T17:36:39.8727420Z #2 0x00007ffd7a3e20d4 llvm::RAGreedy::runOnMachineFunction(llvm::MachineFunction&) (C:\msys64\clangarm64\bin\libLLVM-15.dll+0x6120d4)
2022-09-18T17:36:39.8732465Z #3 0x00007ffd7a28d1d8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (C:\msys64\clangarm64\bin\libLLVM-15.dll+0x4bd1d8)
2022-09-18T17:36:39.8738976Z clang: error: clang frontend command failed due to signal (use -v to see invocation)
2022-09-18T17:36:39.8740086Z clang version 15.0.0
2022-09-18T17:36:39.8741243Z Target: aarch64-w64-windows-gnu
2022-09-18T17:36:39.8742097Z Thread model: posix
2022-09-18T17:36:39.8742991Z InstalledDir: C:/msys64/clangarm64/bin
2022-09-18T17:36:39.8743832Z clang: note: diagnostic msg: 
2022-09-18T17:36:39.8744581Z ********************
2022-09-18T17:36:39.8745004Z 
2022-09-18T17:36:39.8745504Z PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
2022-09-18T17:36:39.8746586Z Preprocessed source(s) and associated run script(s) are located at:
2022-09-18T17:36:39.8749135Z clang: note: diagnostic msg: C:/msys64/tmp/dtrsm_kernel_LN-36ac6b.c
2022-09-18T17:36:40.3853133Z clang: note: diagnostic msg: C:/msys64/tmp/dtrsm_kernel_LN-36ac6b.sh
2022-09-18T17:36:40.3854715Z 
2022-09-18T17:36:40.3855562Z clang: note: diagnostic msg: 
2022-09-18T17:36:40.3856618Z 
2022-09-18T17:36:40.3856671Z 
2022-09-18T17:36:40.3856703Z 
2022-09-18T17:36:40.3881310Z ********************
2022-09-18T17:36:40.3883186Z 

dtrsm_kernel_LN-36ac6b.zip

jeremyd2019 avatar Sep 18 '22 19:09 jeremyd2019

Reproduces with few hours old trunk:

$ /e/tmp/install/bin/clang "-cc1" "-triple" "aarch64-w64-windows-gnu" "-emit-obj" "--mrelax-relocations" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "dtrsm_kernel_LN.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-mms-bitfields" "-funwind-tables=2" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8a" "-target-abi" "aapcs" "-fallow-half-arguments-and-returns" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32" "-sys-header-deps" "-D" "HAVE_C11" "-D" "MS_ABI" "-D" "SMP_SERVER" "-D" "MAX_CPU_NUMBER=64" "-D" "MAX_PARALLEL_NUMBER=1" "-D" "NO_AFFINITY" "-D" "VERSION=\"0.3.21\"" "-D" "BUILD_SINGLE" "-D" "BUILD_DOUBLE" "-D" "BUILD_COMPLEX" "-D" "BUILD_COMPLEX16" "-D" "NDEBUG" "-O3" "-Wall" "-fdebug-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fgnuc-version=4.2.1" "-exception-model=seh" "-vectorize-loops" "-vectorize-slp" "-faddrsig" "-x" "c" "dtrsm_kernel_LN-36ac6b.c"
In file included from C:/M/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dtrsm_kernel_LN.c:10:
In file included from C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/kernel/arm64/../generic/trsm_kernel_LN.c:39:
In file included from C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common.h:466:
C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common_arm64.h:106:65: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
  __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
                                                                ^
C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common_arm64.h:106:30: note: use constraint modifier "w"
  __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
                             ^~
                             %w0
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: E:\\tmp\\install\\bin\\clang.exe -cc1 -triple aarch64-w64-windows-gnu -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name dtrsm_kernel_LN.c -mrelocation-model pic -pic-level 2 -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -mms-bitfields -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32 -sys-header-deps -D HAVE_C11 -D MS_ABI -D SMP_SERVER -D MAX_CPU_NUMBER=64 -D MAX_PARALLEL_NUMBER=1 -D NO_AFFINITY -D VERSION=\"0.3.21\" -D BUILD_SINGLE -D BUILD_DOUBLE -D BUILD_COMPLEX -D BUILD_COMPLEX16 -D NDEBUG -O3 -Wall -fdebug-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32 -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -exception-model=seh -vectorize-loops -vectorize-slp -faddrsig -x c dtrsm_kernel_LN-36ac6b.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'dtrsm_kernel_LN-36ac6b.c'.
4.      Running pass 'Greedy Register Allocator' on function '@dtrsm_kernel_LN'
Exception Code: 0xC0000005
 #0 0x00007ff6e588afa8 (anonymous namespace)::HoistSpillHelper::hoistAllSpills() (E:\tmp\install\bin\clang.exe+0x22fafa8)
 #1 0x00007ff6e5880e5b llvm::RegAllocBase::postOptimization() (E:\tmp\install\bin\clang.exe+0x22f0e5b)
 #2 0x00007ff6e421ebc3 llvm::RAGreedy::runOnMachineFunction(llvm::MachineFunction&) (E:\tmp\install\bin\clang.exe+0xc8ebc3)
 #3 0x00007ff6e3f5aca9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (E:\tmp\install\bin\clang.exe+0x9caca9)
 #4 0x00007ff6e399a684 llvm::FPPassManager::runOnFunction(llvm::Function&) (E:\tmp\install\bin\clang.exe+0x40a684)
 #5 0x00007ff6e39a1893 llvm::FPPassManager::runOnModule(llvm::Module&) (E:\tmp\install\bin\clang.exe+0x411893)
 #6 0x00007ff6e399b2ae llvm::legacy::PassManagerImpl::run(llvm::Module&) (E:\tmp\install\bin\clang.exe+0x40b2ae)
 #7 0x00007ff6e502cd94 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>) (E:\tmp\install\bin\clang.exe+0x1a9cd94)
 #8 0x00007ff6e53d76fa clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (E:\tmp\install\bin\clang.exe+0x1e476fa)
 #9 0x00007ff6e6cbf0ee clang::ParseAST(clang::Sema&, bool, bool) (E:\tmp\install\bin\clang.exe+0x372f0ee)
#10 0x00007ff6e533ecd4 clang::FrontendAction::Execute() (E:\tmp\install\bin\clang.exe+0x1daecd4)
#11 0x00007ff6e3e520f4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (E:\tmp\install\bin\clang.exe+0x8c20f4)
#12 0x00007ff6e3ed13d0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (E:\tmp\install\bin\clang.exe+0x9413d0)
#13 0x00007ff6e3596afc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (E:\tmp\install\bin\clang.exe+0x6afc)
#14 0x00007ff6e3594b25 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (E:\tmp\install\bin\clang.exe+0x4b25)
#15 0x00007ff6e3594863 clang_main(int, char**) (E:\tmp\install\bin\clang.exe+0x4863)
#16 0x00007ff6e35913d7 __tmainCRTStartup C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:329:13
#17 0x00007ff6e3591436 .l_start C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:208:3
#18 0x00007ffee0ae54e0 (C:\WINDOWS\System32\KERNEL32.DLL+0x154e0)
#19 0x00007ffee232485b (C:\WINDOWS\SYSTEM32\ntdll.dll+0x485b)
Segmentation fault

What a nice backtrace by the way 😄 Would you like to report it to LLVM's GitHub repo?

mati865 avatar Sep 18 '22 20:09 mati865

In build with assertions enabled one of them has fired:

$ /e/tmp/build/bin/clang "-cc1" "-triple" "aarch64-w64-windows-gnu" "-emit-obj" "--mrelax-relocations" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "dtrsm_kernel_LN.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-mms-bitfields" "-funwind-tables=2" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8a" "-target-abi" "aapcs" "-fallow-half-arguments-and-returns" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32" "-sys-header-deps" "-D" "HAVE_C11" "-D" "MS_ABI" "-D" "SMP_SERVER" "-D" "MAX_CPU_NUMBER=64" "-D" "MAX_PARALLEL_NUMBER=1" "-D" "NO_AFFINITY" "-D" "VERSION=\"0.3.21\"" "-D" "BUILD_SINGLE" "-D" "BUILD_DOUBLE" "-D" "BUILD_COMPLEX" "-D" "BUILD_COMPLEX16" "-D" "NDEBUG" "-O3" "-Wall" "-fdebug-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fgnuc-version=4.2.1" "-exception-model=seh" "-vectorize-loops" "-vectorize-slp" "-faddrsig" "-x" "c" "dtrsm_kernel_LN-36ac6b.c"
In file included from C:/M/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dtrsm_kernel_LN.c:10:
In file included from C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/kernel/arm64/../generic/trsm_kernel_LN.c:39:
In file included from C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common.h:466:
C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common_arm64.h:106:65: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
  __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
                                                                ^
C:/M/mingw-w64-openblas/src/OpenBLAS-0.3.21/common_arm64.h:106:30: note: use constraint modifier "w"
  __asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
                             ^~
                             %w0
Assertion failed: DT.dominates(RHead, LHead) && "No dominance between recurrences used by one SCEV?", file E:/tmp/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp, line 774
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: E:\\tmp\\build\\bin\\clang.exe -cc1 -triple aarch64-w64-windows-gnu -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name dtrsm_kernel_LN.c -mrelocation-model pic -pic-level 2 -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -mms-bitfields -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32 -sys-header-deps -D HAVE_C11 -D MS_ABI -D SMP_SERVER -D MAX_CPU_NUMBER=64 -D MAX_PARALLEL_NUMBER=1 -D NO_AFFINITY -D VERSION=\"0.3.21\" -D BUILD_SINGLE -D BUILD_DOUBLE -D BUILD_COMPLEX -D BUILD_COMPLEX16 -D NDEBUG -O3 -Wall -fdebug-compilation-dir=C:/M/mingw-w64-openblas/src/build-CLANGARM64-32 -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -exception-model=seh -vectorize-loops -vectorize-slp -faddrsig -x c dtrsm_kernel_LN-36ac6b.c
1.      <eof> parser at end of file
2.      Optimizer
Exception Code: 0xC000001D
 #0 0x00007ff68f286536 HandleAbort (E:\tmp\build\bin\clang.exe+0x9d6536)
 #1 0x00007ffedfbfcd84 (C:\WINDOWS\System32\ucrtbase.dll+0x7cd84)
 #2 0x00007ffedfbfdd61 (C:\WINDOWS\System32\ucrtbase.dll+0x7dd61)
 #3 0x00007ffedfbff6bc (C:\WINDOWS\System32\ucrtbase.dll+0x7f6bc)
 #4 0x00007ffedfbff8b1 (C:\WINDOWS\System32\ucrtbase.dll+0x7f8b1)
 #5 0x00007ff68ed124e3 CompareSCEVComplexity(llvm::EquivalenceClasses<llvm::SCEV const*, std::__1::less<llvm::SCEV const*>>&, llvm::EquivalenceClasses<llvm::Value const*, std::__1::less<llvm::Value const*>>&, llvm::LoopInfo const*, llvm::SCEV const*, llvm::SCEV const*, llvm::DominatorTree&, unsigned int) (E:\tmp\build\bin\clang.exe+0x4624e3)
 #6 0x00007ff68ed1302a void std::__1::__stable_sort<std::__1::_ClassicAlgPolicy, GroupByComplexity(llvm::SmallVectorImpl<llvm::SCEV const*>&, llvm::LoopInfo*, llvm::DominatorTree&)::$_57&, llvm::SCEV const**>(llvm::SCEV const**, llvm::SCEV const**, GroupByComplexity(llvm::SmallVectorImpl<llvm::SCEV const*>&, llvm::LoopInfo*, llvm::DominatorTree&)::$_57&, std::__1::iterator_traits<llvm::SCEV const**>::difference_type, std::__1::iterator_traits<llvm::SCEV const**>::value_type*, long long) (E:\tmp\build\bin\clang.exe+0x46302a)
 #7 0x00007ff68ecc91d1 GroupByComplexity(llvm::SmallVectorImpl<llvm::SCEV const*>&, llvm::LoopInfo*, llvm::DominatorTree&) (E:\tmp\build\bin\clang.exe+0x4191d1)
 #8 0x00007ff68ecba6b4 llvm::ScalarEvolution::getAddExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&, llvm::SCEV::NoWrapFlags, unsigned int) (E:\tmp\build\bin\clang.exe+0x40a6b4)
 #9 0x00007ff68fe0b9a5 llvm::SCEVExpander::expandAddToGEP(llvm::SCEV const* const*, llvm::SCEV const* const*, llvm::PointerType*, llvm::Type*, llvm::Value*) (E:\tmp\build\bin\clang.exe+0x155b9a5)
#10 0x00007ff68fe130f2 llvm::SCEVExpander::visitAddRecExpr(llvm::SCEVAddRecExpr const*) (E:\tmp\build\bin\clang.exe+0x15630f2)
#11 0x00007ff68fe0d2ea llvm::SCEVExpander::expand(llvm::SCEV const*) (E:\tmp\build\bin\clang.exe+0x155d2ea)
#12 0x00007ff68fe0c8ad llvm::SCEVExpander::expandCodeForImpl(llvm::SCEV const*, llvm::Type*, bool) (E:\tmp\build\bin\clang.exe+0x155c8ad)
#13 0x00007ff6909fae43 expandBounds(llvm::RuntimeCheckingPtrGroup const*, llvm::Loop*, llvm::Instruction*, llvm::SCEVExpander&) (E:\tmp\build\bin\clang.exe+0x214ae43)
#14 0x00007ff6909f786f llvm::addRuntimeChecks(llvm::Instruction*, llvm::Loop*, llvm::SmallVectorImpl<std::__1::pair<llvm::RuntimeCheckingPtrGroup const*, llvm::RuntimeCheckingPtrGroup const*>> const&, llvm::SCEVExpander&) (E:\tmp\build\bin\clang.exe+0x214786f)
#15 0x00007ff690a61974 llvm::LoopVersioning::versionLoop(llvm::SmallVectorImpl<llvm::Instruction*> const&) (E:\tmp\build\bin\clang.exe+0x21b1974)
#16 0x00007ff691735e5e eliminateLoadsAcrossLoops(llvm::Function&, llvm::LoopInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*, llvm::ProfileSummaryInfo*, llvm::ScalarEvolution*, llvm::AssumptionCache*, llvm::function_ref<llvm::LoopAccessInfo const& (llvm::Loop&)>) (E:\tmp\build\bin\clang.exe+0x2e85e5e)
#17 0x00007ff691733287 llvm::LoopLoadEliminationPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (E:\tmp\build\bin\clang.exe+0x2e83287)
#18 0x00007ff692575881 llvm::detail::PassModel<llvm::Function, llvm::LoopLoadEliminationPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (E:\tmp\build\bin\clang.exe+0x3cc5881)
#19 0x00007ff68fb16465 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (E:\tmp\build\bin\clang.exe+0x1266465)
#20 0x00007ff68e951311 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (E:\tmp\build\bin\clang.exe+0xa1311)
#21 0x00007ff68fb1a044 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (E:\tmp\build\bin\clang.exe+0x126a044)
#22 0x00007ff68e951021 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (E:\tmp\build\bin\clang.exe+0xa1021)
#23 0x00007ff68fb14ff5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (E:\tmp\build\bin\clang.exe+0x1264ff5)
#24 0x00007ff690c2d846 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>&, std::__1::unique_ptr<llvm::ToolOutputFile, std::__1::default_delete<llvm::ToolOutputFile>>&) (E:\tmp\build\bin\clang.exe+0x237d846)
#25 0x00007ff690c26309 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>) (E:\tmp\build\bin\clang.exe+0x2376309)
#26 0x00007ff69108de9a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (E:\tmp\build\bin\clang.exe+0x27dde9a)
#27 0x00007ff692fa6e3f clang::ParseAST(clang::Sema&, bool, bool) (E:\tmp\build\bin\clang.exe+0x46f6e3f)
#28 0x00007ff690fddae3 clang::FrontendAction::Execute() (E:\tmp\build\bin\clang.exe+0x272dae3)
#29 0x00007ff68f444617 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (E:\tmp\build\bin\clang.exe+0xb94617)
#30 0x00007ff68f4ccf7b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (E:\tmp\build\bin\clang.exe+0xc1cf7b)
#31 0x00007ff68e8b75e4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (E:\tmp\build\bin\clang.exe+0x75e4)
#32 0x00007ff68e8b4f1a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (E:\tmp\build\bin\clang.exe+0x4f1a)
#33 0x00007ff68e8b4cba clang_main(int, char**) (E:\tmp\build\bin\clang.exe+0x4cba)
#34 0x00007ff68e8b13d7 __tmainCRTStartup C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:329:13
#35 0x00007ff68e8b1436 .l_start C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:208:3
#36 0x00007ffee0ae54e0 (C:\WINDOWS\System32\KERNEL32.DLL+0x154e0)
#37 0x00007ffee232485b (C:\WINDOWS\SYSTEM32\ntdll.dll+0x485b)
Illegal instruction

mati865 avatar Sep 18 '22 21:09 mati865

I guess I could... I mostly just opened this issue to have a place to upload the files that were produced

jeremyd2019 avatar Sep 19 '22 00:09 jeremyd2019

I went ahead and changed things from -O3 to -Os for arm64 in dc5906f930b1 to unblock the queue for now.

lazka avatar Sep 19 '22 17:09 lazka

Fixed upstream now, so we could backport it: https://github.com/llvm/llvm-project/commit/623c4a7a55f7

lazka avatar Sep 23 '22 10:09 lazka

And update to LLVM 15.0.1 while at it.

mati865 avatar Sep 23 '22 16:09 mati865

sounds good, see #13253

lazka avatar Sep 23 '22 18:09 lazka

I'm still seeing the same crash with the patched version

lazka avatar Sep 24 '22 11:09 lazka

It looks like changes that claim to fix the original crash have landed upstream, but it also looks like they were too invasive to backport, and instead they are considering reverting the change that introduced the crash in 15.x. https://github.com/llvm/llvm-project/issues/58152

jeremyd2019 avatar Oct 05 '22 18:10 jeremyd2019

The revert made it into 15.0.3 which is https://github.com/msys2/MINGW-packages/pull/13666

I've reverted the openblas workaround as well in https://github.com/msys2/MINGW-packages/pull/13674

lazka avatar Oct 22 '22 09:10 lazka