Description
One of the recent changes that landed is causing an AV in llvm/lib/Target/DirectX/DirectXIRPasses/PointerTypeAnalysis.cpp:35
Four of the DML tests are now crashing.
if (!Inst->getResultElementType()->isPointerTy())
The getResultElementType()
is a nullptr on this instruction
%arrayidx.i30 = getelementptr inbounds nuw %struct.RawStruct8D, ptr %outputSizesLocal.i, i32 0, i32 %20`
repro
lldb -- clang-dxc DirectML/Product/Shaders/Generated/OneHot_256_uint16_native_int32_native_4.hlsl -E CSMain -T cs_6_2 -enable-16bit-types -O3 -D DXC_COMPILER=1 -D __SHADER_TARGET_MAJOR=6 -D __SHADER_TARGET_MINOR=2 -Vd -I DirectML/Product/Shaders/ -Fo validation/OneHot_256_uint16_native_int32_native_4.dat
Stack Traces:
#0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#1 llvm::sys::CleanupOnSignal(unsigned long) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#2 CrashRecoverySignalHandler(int) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#3 (/usr/lib/system/libsystem_platform.dylib+)
#4 llvm::dxil::PointerTypeAnalysis::run(llvm::Module const&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#5 llvm::dxil::PointerTypeAnalysis::run(llvm::Module const&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#6 (anonymous namespace)::DXILPrepareModule::runOnModule(llvm::Module&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#7 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#8 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#9 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#10 clang::ParseAST(clang::Sema&, bool, bool) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#11 clang::CodeGenAction::ExecuteAction() (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#12 clang::FrontendAction::Execute() (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#13 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#14 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#15 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#16 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#17 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_0>(long) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#18 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#19 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#20 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#21 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&, bool) const (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#22 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#23 clang_main(int, char**, llvm::ToolContext const&) (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#24 main (/Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-21+)
#25
clang-dxc: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 21.0.0git (git@github.com:llvm/llvm-project.git ab17ff05621f3029c1afae0d62093287f9d1e2b5)
Target: dxilv1.2-unknown-shadermodel6.2-compute
Thread model: posix
InstalledDir: /Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin
Build config: +assertions, +asan
Cause instances: 4
Cause:
0. Program arguments: /Users/farzonlotfi/Projects/llvm_rel_with_deb_info/bin/clang-dxc ../DirectML/Product/Shaders/Generated/OneHot_256_uint16_native_int32_native_4.hlsl -E CSMain -T cs_6_2 -enable-16bit-types -O3 -D DXC_COMPILER=1 -D __SHADER_TARGET_MAJOR=6 -D __SHADER_TARGET_MINOR=2 -Vd -I ../DirectML/Product/Shaders/ -Fo /Users/farzonlotfi/Projects/ClangDML/tools/validation/OneHot_256_uint16_native_int32_native_4.dat
1. <eof> parser at end of file
2. Code generation
3. Running pass 'DXIL Prepare Module' on module '../DirectML/Product/Shaders/Generated/OneHot_256_uint16_native_int32_native_4.hlsl'.
----------------------------------------
Metadata
Metadata
Assignees
Type
Projects
Status
Closed