Clang-vk tests are failing due to reaching an llvm_unreachable within the transformLoad function in llvm\lib\Target\SPIRV\SPIRVLegalizePointerCast.cpp
********************
FAIL: OffloadTest-clang-vk :: WaveOps/WavePrefixProduct.fp64.test (4 of 6)
******************** TEST 'OffloadTest-clang-vk :: WaveOps/WavePrefixProduct.fp64.test' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 179
d:\llvm-project\build\bin\split-file.exe D:\OffloadTest\test\WaveOps\WavePrefixProduct.fp64.test D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp
# executed command: 'd:\llvm-project\build\bin\split-file.exe' 'D:\OffloadTest\test\WaveOps\WavePrefixProduct.fp64.test' 'D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp'
# RUN: at line 180
d:\llvm-project\build\bin\clang-dxc.exe -spirv -fspv-target-env=vulkan1.3 -fspv-extension=DXC --dxv-path=D:/hlsl.bin/Debug/bin -T cs_6_5 -Fo D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp.o D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp/source.hlsl
# executed command: 'd:\llvm-project\build\bin\clang-dxc.exe' -spirv -fspv-target-env=vulkan1.3 -fspv-extension=DXC --dxv-path=D:/hlsl.bin/Debug/bin -T cs_6_5 -Fo 'D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp.o' 'D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp/source.hlsl'
# .---command stderr------------
# | Unimplemented implicit down-cast from load.
# | UNREACHABLE executed at D:/llvm-project/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp:331!
# | 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: d:\\llvm-project\\build\\bin\\clang-dxc.exe -spirv -fspv-target-env=vulkan1.3 -fspv-extension=DXC --dxv-path=D:/hlsl.bin/Debug/bin -T cs_6_5 -Fo D:\\llvm-project\\build\\tools\\OffloadTest\\test\\clang-vk\\WaveOps\\Output\\WavePrefixProduct.fp64.test.tmp.o D:\\llvm-project\\build\\tools\\OffloadTest\\test\\clang-vk\\WaveOps\\Output\\WavePrefixProduct.fp64.test.tmp/source.hlsl
# | 1. <eof> parser at end of file
# | 2. Code generation
# | 3. Running pass 'Function Pass Manager' on module 'D:\llvm-project\build\tools\OffloadTest\test\clang-vk\WaveOps\Output\WavePrefixProduct.fp64.test.tmp/source.hlsl'.
# | 4. Running pass 'SPIRV legalize bitcast pass' on function '@main'
# | Exception Code: 0xC000001D
# | #0 0x00007ff717c6912c HandleAbort D:\llvm-project\llvm\lib\Support\Windows\Signals.inc:372:0
# | #1 0x00007ffd5d4c9e77 (C:\windows\SYSTEM32\ucrtbased.dll+0x99e77)
# | #2 0x00007ffd5d4cbab9 (C:\windows\SYSTEM32\ucrtbased.dll+0x9bab9)
# | #3 0x00007ff717cdbf5e llvm::llvm_unreachable_internal(char const *, char const *, unsigned int) D:\llvm-project\llvm\lib\Support\ErrorHandling.cpp:244:0
# | #4 0x00007ff71834552e `anonymous namespace'::SPIRVLegalizePointerCast::transformLoad D:\llvm-project\llvm\lib\Target\SPIRV\SPIRVLegalizePointerCast.cpp:328:0
# | #5 0x00007ff718345019 `anonymous namespace'::SPIRVLegalizePointerCast::legalizePointerCast D:\llvm-project\llvm\lib\Target\SPIRV\SPIRVLegalizePointerCast.cpp:496:0
# | #6 0x00007ff718344ca9 `anonymous namespace'::SPIRVLegalizePointerCast::runOnFunction D:\llvm-project\llvm\lib\Target\SPIRV\SPIRVLegalizePointerCast.cpp:550:0
# | #7 0x00007ff71782edb3 llvm::FPPassManager::runOnFunction(class llvm::Function &) D:\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1398:0
# | #8 0x00007ff7178338ed llvm::FPPassManager::runOnModule(class llvm::Module &) D:\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1444:0
# | #9 0x00007ff71782f6d4 `anonymous namespace'::MPPassManager::runOnModule D:\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1513:0
# | #10 0x00007ff71782f1f5 llvm::legacy::PassManagerImpl::run(class llvm::Module &) D:\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:531:0
# | #11 0x00007ff717833bb1 llvm::legacy::PassManager::run(class llvm::Module &) D:\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1640:0
# | #12 0x00007ff719890731 `anonymous namespace'::EmitAssemblyHelper::RunCodegenPipeline D:\llvm-project\clang\lib\CodeGen\BackendUtil.cpp:1277:0
# | #13 0x00007ff71988a117 `anonymous namespace'::EmitAssemblyHelper::emitAssembly D:\llvm-project\clang\lib\CodeGen\BackendUtil.cpp:1303:0
# | #14 0x00007ff71988939a clang::emitBackendOutput(class clang::CompilerInstance &, class clang::CodeGenOptions &, class llvm::StringRef, class llvm::Module *, enum clang::BackendAction, class llvm::IntrusiveRefCntPtr<class llvm::vfs::FileSystem>, class std::unique_ptr<class llvm::raw_pwrite_stream, struct std::default_delete<class llvm::raw_pwrite_stream>>, class clang::BackendConsumer *) D:\llvm-project\clang\lib\CodeGen\BackendUtil.cpp:1481:0
# | #15 0x00007ff71a1f4849 clang::BackendConsumer::HandleTranslationUnit(class clang::ASTContext &) D:\llvm-project\clang\lib\CodeGen\CodeGenAction.cpp:316:0
# | #16 0x00007ff71d57dc79 clang::ParseAST(class clang::Sema &, bool, bool) D:\llvm-project\clang\lib\Parse\ParseAST.cpp:190:0
# | #17 0x00007ff71a10443f clang::ASTFrontendAction::ExecuteAction(void) D:\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1464:0
# | #18 0x00007ff71a1f92cf clang::CodeGenAction::ExecuteAction(void) D:\llvm-project\clang\lib\CodeGen\CodeGenAction.cpp:1149:0
# | #19 0x00007ff71a1046c0 clang::WrapperFrontendAction::ExecuteAction(void) D:\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1495:0
# | #20 0x00007ff71a19f437 clang::HLSLFrontendAction::ExecuteAction(void) D:\llvm-project\clang\lib\Frontend\FrontendActions.cpp:1331:0
# | #21 0x00007ff71a103dcf clang::FrontendAction::Execute(void) D:\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1346:0
# | #22 0x00007ff717f3b880 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) D:\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:990:0
# | #23 0x00007ff7180613e2 clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) D:\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:318:0
# | #24 0x00007ff71736ff41 cc1_main(class llvm::ArrayRef<char const *>, char const *, void *) D:\llvm-project\clang\tools\driver\cc1_main.cpp:302:0
# | #25 0x00007ff717362750 ExecuteCC1Tool D:\llvm-project\clang\tools\driver\driver.cpp:229:0
# | #26 0x00007ff71736346c clang_main::<lambda_0>::operator() D:\llvm-project\clang\tools\driver\driver.cpp:379:0
# | #27 0x00007ff71736340d llvm::function_ref<int (llvm::SmallVectorImpl<const char *> &)>::callback_fn<`lambda at D:\llvm-project\clang\tools\driver\driver.cpp:377:32'> D:\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h:46:0
# | #28 0x00007ff719cfe2a1 llvm::function_ref<(class llvm::SmallVectorImpl<char const *> &)>::operator()(class llvm::SmallVectorImpl<char const *> &) const D:\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h:69:0
# | #29 0x00007ff719cfb167 clang::driver::CC1Command::Execute::<lambda_1>::operator() D:\llvm-project\clang\lib\Driver\Job.cpp:442:0
# | #30 0x00007ff719cfb133 llvm::function_ref<void ()>::callback_fn<`lambda at D:\llvm-project\clang\lib\Driver\Job.cpp:442:22'> D:\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h:46:0
# | #31 0x00007ff717c21b67 llvm::function_ref<(void)>::operator()(void) const D:\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h:69:0
# | #32 0x00007ff717c61bf8 llvm::CrashRecoveryContext::RunSafely(class llvm::function_ref<(void)>) D:\llvm-project\llvm\lib\Support\CrashRecoveryContext.cpp:237:0
# | #33 0x00007ff719cfabdb clang::driver::CC1Command::Execute(class llvm::ArrayRef<class std::optional<class llvm::StringRef>>, class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> *, bool *) const D:\llvm-project\clang\lib\Driver\Job.cpp:442:0
# | #34 0x00007ff717f1d09c clang::driver::Compilation::ExecuteCommand(class clang::driver::Command const &, class clang::driver::Command const *&, bool) const D:\llvm-project\clang\lib\Driver\Compilation.cpp:196:0
# | #35 0x00007ff717f1d2c1 clang::driver::Compilation::ExecuteJobs(class clang::driver::JobList const &, class llvm::SmallVectorImpl<struct std::pair<int, class clang::driver::Command const *>> &, bool) const D:\llvm-project\clang\lib\Driver\Compilation.cpp:246:0
# | #36 0x00007ff717ec29dc clang::driver::Driver::ExecuteCompilation(class clang::driver::Compilation &, class llvm::SmallVectorImpl<struct std::pair<int, class clang::driver::Command const *>> &) D:\llvm-project\clang\lib\Driver\Driver.cpp:2328:0
# | #37 0x00007ff717362212 clang_main(int, char **, struct llvm::ToolContext const &) D:\llvm-project\clang\tools\driver\driver.cpp:419:0
# | #38 0x00007ff717397bea main D:\llvm-project\build\tools\clang\tools\driver\clang-driver.cpp:17:0
# | #39 0x00007ff720fbef29 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
# | #40 0x00007ff720fbf062 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
# | #41 0x00007ff720fbf0ee __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
# | #42 0x00007ff720fbf10e mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
# | #43 0x00007ffdf03fe8d7 (C:\windows\System32\KERNEL32.DLL+0x2e8d7)
# | #44 0x00007ffdf1eec48c (C:\windows\SYSTEM32\ntdll.dll+0x8c48c)
# | clang-dxc: error: clang frontend command failed due to signal (use -v to see invocation)
# | clang version 23.0.0git (https://github.com/llvm/llvm-project.git c9f175bed493ccbe6c85a5c4e4fb7f1b800123a2)
# | Target: spirv1.6-unknown-vulkan1.3-compute
# | Thread model: posix
# | InstalledDir: D:\llvm-project\build\bin
# | Build config: +unoptimized, +assertions
# | clang-dxc: note: diagnostic msg:
# | ********************
# |
# | PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
# | Preprocessed source(s) and associated run script(s) are located at:
# | clang-dxc: note: diagnostic msg: C:\Users\jbatista\AppData\Local\Temp\lit-tmp-_p305ntm\source-9961d7.hlsl
# | clang-dxc: note: diagnostic msg: C:\Users\jbatista\AppData\Local\Temp\lit-tmp-_p305ntm\source-9961d7.sh
# | clang-dxc: note: diagnostic msg:
# |
# | ********************
# `-----------------------------
# error: command failed with exit status: 1
--
Clang-vk tests are failing due to reaching an llvm_unreachable within the transformLoad function in
llvm\lib\Target\SPIRV\SPIRVLegalizePointerCast.cppThis is the output below: