[llvm] [AssumeBuilder] Fix incorrect nonnull optimization (PR #195676)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 09:10:43 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 7954 tests passed
* 451 tests skipped

All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.

<details>
<summary>[code=4294967295] bin/obj2yaml.exe</summary>

```
FAILED: [code=4294967295] bin/obj2yaml.exe
C:\Windows\system32\cmd.exe /C "cd . && C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E vs_link_exe --msvc-ver=1944 --intdir=tools\obj2yaml\CMakeFiles\obj2yaml.dir --rc="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\rc.exe" --mt="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\mt.exe" --manifests  -- C:\clang\clang-msvc\bin\lld-link.exe /nologo tools\obj2yaml\CMakeFiles\obj2yaml.dir\archive2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\obj2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\coff2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\dwarf2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\dxcontainer2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\elf2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\macho2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\minidump2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\offload2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\xcoff2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\wasm2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\__\__\resources\windows_version_resource.rc.res  /out:bin\obj2yaml.exe /implib:lib\obj2yaml.lib /pdb:bin\obj2yaml.pdb /version:0.0 /MANIFEST:NO /INCREMENTAL:NO /subsystem:console  /STACK:10000000  lib\LLVMBinaryFormat.lib  lib\LLVMDebugInfoCodeView.lib  lib\LLVMDebugInfoDWARF.lib  lib\LLVMObject.lib  lib\LLVMObjectYAML.lib  lib\LLVMProfileData.lib  lib\LLVMSupport.lib  lib\LLVMSymbolize.lib  lib\LLVMDebugInfoGSYM.lib  lib\LLVMDebugInfoPDB.lib  lib\LLVMIRReader.lib  lib\LLVMBitReader.lib  lib\LLVMAsmParser.lib  lib\LLVMCore.lib  lib\LLVMRemarks.lib  lib\LLVMBitstreamReader.lib  lib\LLVMMCParser.lib  lib\LLVMMC.lib  lib\LLVMDebugInfoDWARFLowLevel.lib  lib\LLVMTextAPI.lib  lib\LLVMTargetParser.lib  lib\LLVMDebugInfoMSF.lib  lib\LLVMDebugInfoBTF.lib  lib\LLVMDemangle.lib  psapi.lib  shell32.lib  ole32.lib  uuid.lib  advapi32.lib  ws2_32.lib  ntdll.lib  delayimp.lib  -delayload:shell32.dll  -delayload:ole32.dll  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\clang\clang-msvc\bin\lld-link.exe /nologo tools\obj2yaml\CMakeFiles\obj2yaml.dir\archive2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\obj2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\coff2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\dwarf2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\dxcontainer2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\elf2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\macho2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\minidump2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\offload2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\xcoff2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\wasm2yaml.cpp.obj tools\obj2yaml\CMakeFiles\obj2yaml.dir\__\__\resources\windows_version_resource.rc.res /out:bin\obj2yaml.exe /implib:lib\obj2yaml.lib /pdb:bin\obj2yaml.pdb /version:0.0 /MANIFEST:NO /INCREMENTAL:NO /subsystem:console /STACK:10000000 lib\LLVMBinaryFormat.lib lib\LLVMDebugInfoCodeView.lib lib\LLVMDebugInfoDWARF.lib lib\LLVMObject.lib lib\LLVMObjectYAML.lib lib\LLVMProfileData.lib lib\LLVMSupport.lib lib\LLVMSymbolize.lib lib\LLVMDebugInfoGSYM.lib lib\LLVMDebugInfoPDB.lib lib\LLVMIRReader.lib lib\LLVMBitReader.lib lib\LLVMAsmParser.lib lib\LLVMCore.lib lib\LLVMRemarks.lib lib\LLVMBitstreamReader.lib lib\LLVMMCParser.lib lib\LLVMMC.lib lib\LLVMDebugInfoDWARFLowLevel.lib lib\LLVMTextAPI.lib lib\LLVMTargetParser.lib lib\LLVMDebugInfoMSF.lib lib\LLVMDebugInfoBTF.lib lib\LLVMDemangle.lib psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib ws2_32.lib ntdll.lib delayimp.lib -delayload:shell32.dll -delayload:ole32.dll kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib" failed (exit code 1) with the following output:
lld-link: error: undefined symbol: public: __cdecl llvm::StringTableBuilder::StringTableBuilder(enum llvm::StringTableBuilder::Kind, struct llvm::Align)
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced 11 more times

lld-link: error: undefined symbol: public: unsigned __int64 __cdecl llvm::StringTableBuilder::add(class llvm::CachedHashStringRef, unsigned char)
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced 36 more times

lld-link: error: undefined symbol: public: void __cdecl llvm::StringTableBuilder::finalize(void)
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced 10 more times

lld-link: error: undefined symbol: public: unsigned __int64 __cdecl llvm::StringTableBuilder::getOffset(class llvm::CachedHashStringRef) const
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(private: unsigned __int64 __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::getSectionNameOffset(class llvm::StringRef))
>>> referenced 19 more times

lld-link: error: undefined symbol: public: void __cdecl llvm::StringTableBuilder::write(class llvm::raw_ostream &) const
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(private: void __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::initStrtabSectionHeader(struct llvm::object::Elf_Shdr_Impl<struct llvm::object::ELFType<1, 1>> &, class object::StringRef, class object::StringTableBuilder &, class `anonymous namespace'::ContiguousBlobAccumulator &, struct object::ELFYAML::Section *))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(private: void __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<0, 1>>::initStrtabSectionHeader(struct llvm::object::Elf_Shdr_Impl<struct llvm::object::ELFType<0, 1>> &, class object::StringRef, class object::StringTableBuilder &, class `anonymous namespace'::ContiguousBlobAccumulator &, struct object::ELFYAML::Section *))
>>> referenced 2 more times

lld-link: error: undefined symbol: public: __cdecl llvm::StringTableBuilder::~StringTableBuilder(void)
>>> referenced by LLVMObject.lib(OffloadBinary.cpp.obj):(public: static class llvm::SmallString<0> __cdecl llvm::object::OffloadBinary::write(class llvm::ArrayRef<struct llvm::object::OffloadBinary::OffloadingImage>))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced by LLVMObjectYAML.lib(ELFEmitter.cpp.obj):(public: static bool __cdecl `anonymous namespace'::ELFState<struct llvm::object::ELFType<1, 1>>::writeELF(class llvm::raw_ostream &, struct raw_ostream::ELFYAML::Object &, class raw_ostream::function_ref<void __cdecl(class llvm::Twine const &)>, unsigned __int64))
>>> referenced 11 more times

lld-link: error: undefined symbol: public: static class llvm::Target const * __cdecl llvm::TargetRegistry::lookupTarget(class llvm::Triple const &, class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> &)
>>> referenced by LLVMObject.lib(ELFObjectFile.cpp.obj):(public: class std::vector<struct llvm::object::ELFPltEntry, class std::allocator<struct llvm::object::ELFPltEntry>> __cdecl llvm::object::ELFObjectFileBase::getPltEntries(class llvm::MCSubtargetInfo const &) const)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(void __cdecl initializeRecordStreamer(class llvm::Module const &, class llvm::function_ref<void __cdecl(class llvm::RecordStreamer &)>))

lld-link: error: undefined symbol: public: __cdecl llvm::MCTargetOptions::MCTargetOptions(void)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(void __cdecl initializeRecordStreamer(class llvm::Module const &, class llvm::function_ref<void __cdecl(class llvm::RecordStreamer &)>))
>>> referenced by LLVMMCParser.lib(MCAsmParser.cpp.obj):(public: virtual void __cdecl llvm::MCParsedAsmOperand::dump(void) const)

lld-link: error: undefined symbol: public: static bool __cdecl llvm::Target::isValidFeatureListFormat(class llvm::StringRef)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(void __cdecl initializeRecordStreamer(class llvm::Module const &, class llvm::function_ref<void __cdecl(class llvm::RecordStreamer &)>))

lld-link: error: undefined symbol: public: __cdecl llvm::MCContext::MCContext(class llvm::Triple const &, class llvm::MCAsmInfo const &, class llvm::MCRegisterInfo const &, class llvm::MCSubtargetInfo const &, class llvm::SourceMgr const *, bool, class llvm::StringRef)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(void __cdecl initializeRecordStreamer(class llvm::Module const &, class llvm::function_ref<void __cdecl(class llvm::RecordStreamer &)>))

lld-link: error: undefined symbol: public: __cdecl llvm::MCContext::~MCContext(void)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(void __cdecl initializeRecordStreamer(class llvm::Module const &, class llvm::function_ref<void __cdecl(class llvm::RecordStreamer &)>))

lld-link: error: undefined symbol: public: void __cdecl llvm::MCObjectFileInfo::initMCObjectFileInfo(class llvm::MCContext &, bool, bool)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(public: class llvm::MCObjectFileInfo * __cdecl llvm::Target::createMCObjectFileInfo(class llvm::MCContext &, bool, bool) const)

lld-link: error: undefined symbol: public: virtual __cdecl llvm::MCStreamer::~MCStreamer(void)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(public: virtual __cdecl llvm::RecordStreamer::~RecordStreamer(void))
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: undefined symbol: public: virtual __cdecl llvm::MCObjectFileInfo::~MCObjectFileInfo(void)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(public: virtual void * __cdecl llvm::MCObjectFileInfo::`scalar deleting dtor'(unsigned int))

lld-link: error: undefined symbol: protected: virtual void __cdecl llvm::MCStreamer::changeSection(class llvm::MCSection *, unsigned int)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(const llvm::RecordStreamer::`vftable')
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: undefined symbol: protected: virtual void __cdecl llvm::MCStreamer::emitCFIStartProcImpl(struct llvm::MCDwarfFrameInfo &)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(const llvm::RecordStreamer::`vftable')
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: undefined symbol: protected: virtual void __cdecl llvm::MCStreamer::emitCFIEndProcImpl(struct llvm::MCDwarfFrameInfo &)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(const llvm::RecordStreamer::`vftable')
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: undefined symbol: protected: virtual void __cdecl llvm::MCStreamer::emitWindowsUnwindTables(void)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(const llvm::RecordStreamer::`vftable')
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: undefined symbol: protected: virtual void __cdecl llvm::MCStreamer::emitWindowsUnwindTables(struct llvm::WinEH::FrameInfo *)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(const llvm::RecordStreamer::`vftable')
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: undefined symbol: protected: virtual void __cdecl llvm::MCStreamer::emitRawTextImpl(class llvm::StringRef)
>>> referenced by LLVMObject.lib(ModuleSymbolTable.cpp.obj):(const llvm::RecordStreamer::`vftable')
>>> referenced by LLVMObject.lib(RecordStreamer.cpp.obj)

lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the llvm-commits mailing list