Skip to content

[DirectX] Add ObjectFile boilerplate for objdump #151434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 4, 2025

Conversation

llvm-beanz
Copy link
Collaborator

This change adds boilerplate code to implement the object::ObjectFile interface for the DXContainer object file and an empty implementation of the objdump Dumper object.

Adding an ObjectFile implementation for DXContainer is a bit odd because the DXContainer format doesn't have a symbol table, so there isn't a reasonable implementation for the SymbolicFile interfaces. That said, it does have sections, and it will be useful for objdump to be able to inspect some of the structured data stored in some of the special named sections.

At this point in the implementation it can't do much other than dump the part names, offsets, and sizes. Dumping detailed structured section contents to be extended in subsequent PRs.

Fixes #151433

This change adds boilerplate code to implement the object::ObjectFile
interface for the DXContainer object file and an empty implementation
of the objdump Dumper object.

At this point in the implementation it can't do much other than dump
the part names, offsets, and sizes. Dumping detailed structured section
contents to be extended in subsequent PRs.

Fixes llvm#151433
@llvmbot
Copy link
Member

llvmbot commented Jul 31, 2025

@llvm/pr-subscribers-llvm-binary-utilities

@llvm/pr-subscribers-backend-directx

Author: Chris B (llvm-beanz)

Changes

This change adds boilerplate code to implement the object::ObjectFile interface for the DXContainer object file and an empty implementation of the objdump Dumper object.

Adding an ObjectFile implementation for DXContainer is a bit odd because the DXContainer format doesn't have a symbol table, so there isn't a reasonable implementation for the SymbolicFile interfaces. That said, it does have sections, and it will be useful for objdump to be able to inspect some of the structured data stored in some of the special named sections.

At this point in the implementation it can't do much other than dump the part names, offsets, and sizes. Dumping detailed structured section contents to be extended in subsequent PRs.

Fixes #151433


Full diff: https://github.com/llvm/llvm-project/pull/151434.diff

14 Files Affected:

  • (modified) llvm/include/llvm-c/Object.h (+1)
  • (modified) llvm/include/llvm/Object/Binary.h (+3)
  • (modified) llvm/include/llvm/Object/DXContainer.h (+81)
  • (modified) llvm/include/llvm/Object/ObjectFile.h (+4)
  • (modified) llvm/lib/Object/Binary.cpp (+1-1)
  • (modified) llvm/lib/Object/DXContainer.cpp (+155)
  • (modified) llvm/lib/Object/Object.cpp (+2)
  • (modified) llvm/lib/Object/ObjectFile.cpp (+3-1)
  • (modified) llvm/lib/Object/SymbolicFile.cpp (+2)
  • (added) llvm/test/tools/llvm-objdump/DXContainer/part-headers.yaml (+58)
  • (modified) llvm/tools/llvm-objdump/CMakeLists.txt (+1)
  • (added) llvm/tools/llvm-objdump/DXContainerDump.cpp (+30)
  • (modified) llvm/tools/llvm-objdump/llvm-objdump.cpp (+3)
  • (modified) llvm/tools/llvm-objdump/llvm-objdump.h (+3)
diff --git a/llvm/include/llvm-c/Object.h b/llvm/include/llvm-c/Object.h
index 0fc4ebe969a06..f24f768570c5e 100644
--- a/llvm/include/llvm-c/Object.h
+++ b/llvm/include/llvm-c/Object.h
@@ -55,6 +55,7 @@ typedef enum {
   LLVMBinaryTypeMachO64B,             /**< MachO 64-bit, big endian. */
   LLVMBinaryTypeWasm,                 /**< Web Assembly. */
   LLVMBinaryTypeOffload,              /**< Offloading fatbinary. */
+  LLVMBinaryTypeDXcontainer,          /**< DirectX Binary Container. */
 
 } LLVMBinaryType;
 
diff --git a/llvm/include/llvm/Object/Binary.h b/llvm/include/llvm/Object/Binary.h
index bd98f40dbc706..a531ba6a812c4 100644
--- a/llvm/include/llvm/Object/Binary.h
+++ b/llvm/include/llvm/Object/Binary.h
@@ -72,6 +72,7 @@ class LLVM_ABI Binary {
 
     ID_GOFF,
     ID_Wasm,
+    ID_DXContainer,
 
     ID_EndObjects
   };
@@ -161,6 +162,8 @@ class LLVM_ABI Binary {
 
   bool isWinRes() const { return TypeID == ID_WinRes; }
 
+  bool isDXContainer() const { return TypeID == ID_DXContainer; }
+
   Triple::ObjectFormatType getTripleObjectFormat() const {
     if (isCOFF())
       return Triple::COFF;
diff --git a/llvm/include/llvm/Object/DXContainer.h b/llvm/include/llvm/Object/DXContainer.h
index 51f570da6df52..274efeee96c7c 100644
--- a/llvm/include/llvm/Object/DXContainer.h
+++ b/llvm/include/llvm/Object/DXContainer.h
@@ -20,6 +20,7 @@
 #include "llvm/ADT/Twine.h"
 #include "llvm/BinaryFormat/DXContainer.h"
 #include "llvm/Object/Error.h"
+#include "llvm/Object/ObjectFile.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/Error.h"
@@ -499,6 +500,7 @@ class DXContainer {
     } IteratorState;
 
     friend class DXContainer;
+    friend class DXContainerObjectFile;
 
     PartIterator(const DXContainer &C,
                  SmallVectorImpl<uint32_t>::const_iterator It)
@@ -584,6 +586,85 @@ class DXContainer {
   }
 };
 
+class DXContainerObjectFile : public ObjectFile {
+private:
+  friend class ObjectFile;
+  DXContainer Container;
+
+  using PartData = DXContainer::PartIterator::PartData;
+  llvm::SmallVector<PartData> Parts;
+  using PartIterator = llvm::SmallVector<PartData>::iterator;
+
+  DXContainerObjectFile(DXContainer C)
+      : ObjectFile(ID_DXContainer, MemoryBufferRef(C.getData(), "")),
+        Container(C) {
+    for (auto &P : C)
+      Parts.push_back(P);
+  }
+
+public:
+  static bool classof(const Binary *v) { return v->isDXContainer(); }
+
+  Expected<StringRef> getSymbolName(DataRefImpl) const override { return ""; }
+  Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
+  uint64_t getSymbolValueImpl(DataRefImpl Symb) const override { return 0; }
+  uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override {
+    return 0;
+  }
+  Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override {
+    return SymbolRef::Type::ST_Unknown;
+  }
+
+  Expected<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
+  void moveSectionNext(DataRefImpl &Sec) const override;
+  Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
+  uint64_t getSectionAddress(DataRefImpl Sec) const override;
+  uint64_t getSectionIndex(DataRefImpl Sec) const override;
+  uint64_t getSectionSize(DataRefImpl Sec) const override;
+  Expected<ArrayRef<uint8_t>>
+  getSectionContents(DataRefImpl Sec) const override;
+
+  uint64_t getSectionAlignment(DataRefImpl Sec) const override;
+  bool isSectionCompressed(DataRefImpl Sec) const override;
+  bool isSectionText(DataRefImpl Sec) const override;
+  bool isSectionData(DataRefImpl Sec) const override;
+  bool isSectionBSS(DataRefImpl Sec) const override;
+  bool isSectionVirtual(DataRefImpl Sec) const override;
+
+  relocation_iterator section_rel_begin(DataRefImpl Sec) const override;
+  relocation_iterator section_rel_end(DataRefImpl Sec) const override;
+
+  void moveRelocationNext(DataRefImpl &Rel) const override;
+  uint64_t getRelocationOffset(DataRefImpl Rel) const override;
+  symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override;
+  uint64_t getRelocationType(DataRefImpl Rel) const override;
+  void getRelocationTypeName(DataRefImpl Rel,
+                             SmallVectorImpl<char> &Result) const override;
+
+  section_iterator section_begin() const override;
+  section_iterator section_end() const override;
+
+  uint8_t getBytesInAddress() const override;
+  StringRef getFileFormatName() const override;
+  Triple::ArchType getArch() const override;
+  Expected<SubtargetFeatures> getFeatures() const override;
+
+  void moveSymbolNext(DataRefImpl &Symb) const override {}
+  Error printSymbolName(raw_ostream &OS, DataRefImpl Symb) const override;
+  Expected<uint32_t> getSymbolFlags(DataRefImpl Symb) const override {
+    return 0;
+  }
+  basic_symbol_iterator symbol_begin() const override {
+    return basic_symbol_iterator(SymbolRef());
+  }
+  basic_symbol_iterator symbol_end() const override {
+    return basic_symbol_iterator(SymbolRef());
+  }
+  bool is64Bit() const override { return 0; }
+
+  bool isRelocatableObject() const override { return false; }
+};
+
 } // namespace object
 } // namespace llvm
 
diff --git a/llvm/include/llvm/Object/ObjectFile.h b/llvm/include/llvm/Object/ObjectFile.h
index 613c36a6a56d7..289cc770e3466 100644
--- a/llvm/include/llvm/Object/ObjectFile.h
+++ b/llvm/include/llvm/Object/ObjectFile.h
@@ -44,6 +44,7 @@ class SectionRef;
 class SymbolRef;
 class symbol_iterator;
 class WasmObjectFile;
+class DXContainerObjectFile;
 
 using section_iterator = content_iterator<SectionRef>;
 
@@ -401,6 +402,9 @@ class LLVM_ABI ObjectFile : public SymbolicFile {
 
   static Expected<std::unique_ptr<WasmObjectFile>>
   createWasmObjectFile(MemoryBufferRef Object);
+
+  static Expected<std::unique_ptr<DXContainerObjectFile>>
+  createDXContainerObjectFile(MemoryBufferRef Object);
 };
 
 /// A filtered iterator for SectionRefs that skips sections based on some given
diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
index 2dfae8ab5d3c6..da2a7bb0a19da 100644
--- a/llvm/lib/Object/Binary.cpp
+++ b/llvm/lib/Object/Binary.cpp
@@ -75,6 +75,7 @@ Expected<std::unique_ptr<Binary>> object::createBinary(MemoryBufferRef Buffer,
   case file_magic::xcoff_object_32:
   case file_magic::xcoff_object_64:
   case file_magic::wasm_object:
+  case file_magic::dxcontainer_object:
     return ObjectFile::createSymbolicFile(Buffer, Type, Context, InitContent);
   case file_magic::macho_universal_binary:
     return MachOUniversalBinary::create(Buffer);
@@ -87,7 +88,6 @@ Expected<std::unique_ptr<Binary>> object::createBinary(MemoryBufferRef Buffer,
   case file_magic::clang_ast:
   case file_magic::cuda_fatbinary:
   case file_magic::coff_cl_gl_object:
-  case file_magic::dxcontainer_object:
   case file_magic::offload_bundle:
   case file_magic::offload_bundle_compressed:
   case file_magic::spirv_object:
diff --git a/llvm/lib/Object/DXContainer.cpp b/llvm/lib/Object/DXContainer.cpp
index 0b46ff71240b7..cab49fc685982 100644
--- a/llvm/lib/Object/DXContainer.cpp
+++ b/llvm/lib/Object/DXContainer.cpp
@@ -11,6 +11,7 @@
 #include "llvm/Object/Error.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/FormatVariadic.h"
+#include "llvm/TargetParser/SubtargetFeature.h"
 
 using namespace llvm;
 using namespace llvm::object;
@@ -515,3 +516,157 @@ uint8_t DirectX::PSVRuntimeInfo::getSigPatchOrPrimCount() const {
     return P->SigPatchOrPrimElements;
   return 0;
 }
+
+class DXNotSupportedError : public ErrorInfo<DXNotSupportedError> {
+public:
+  static char ID;
+
+  DXNotSupportedError(StringRef S) : FeatureString(S) {}
+
+  void log(raw_ostream &OS) const override {
+    OS << "DXContainer does not support " << FeatureString;
+  }
+
+  std::error_code convertToErrorCode() const override {
+    return inconvertibleErrorCode();
+  }
+
+private:
+  StringRef FeatureString;
+};
+
+char DXNotSupportedError::ID = 0;
+
+Expected<section_iterator>
+DXContainerObjectFile::getSymbolSection(DataRefImpl Symb) const {
+  return make_error<DXNotSupportedError>("Symbol sections");
+}
+
+Expected<uint64_t>
+DXContainerObjectFile::getSymbolAddress(DataRefImpl Symb) const {
+  return make_error<DXNotSupportedError>("Symbol addresses");
+}
+
+void DXContainerObjectFile::moveSectionNext(DataRefImpl &Sec) const {
+  PartIterator It = reinterpret_cast<PartIterator>(Sec.p);
+  if (It == Parts.end())
+    return;
+
+  It++;
+  Sec.p = reinterpret_cast<uintptr_t>(It);
+}
+
+Expected<StringRef>
+DXContainerObjectFile::getSectionName(DataRefImpl Sec) const {
+  PartIterator It = reinterpret_cast<PartIterator>(Sec.p);
+  return StringRef(It->Part.getName());
+}
+
+uint64_t DXContainerObjectFile::getSectionAddress(DataRefImpl Sec) const {
+  PartIterator It = reinterpret_cast<PartIterator>(Sec.p);
+  return It->Offset;
+}
+
+uint64_t DXContainerObjectFile::getSectionIndex(DataRefImpl Sec) const {
+  return (Sec.p - reinterpret_cast<uintptr_t>(Parts.begin())) /
+         sizeof(PartIterator);
+}
+
+uint64_t DXContainerObjectFile::getSectionSize(DataRefImpl Sec) const {
+  PartIterator It = reinterpret_cast<PartIterator>(Sec.p);
+  return It->Data.size();
+}
+Expected<ArrayRef<uint8_t>>
+DXContainerObjectFile::getSectionContents(DataRefImpl Sec) const {
+  PartIterator It = reinterpret_cast<PartIterator>(Sec.p);
+  return ArrayRef<uint8_t>(It->Data.bytes_begin(), It->Data.size());
+}
+
+uint64_t DXContainerObjectFile::getSectionAlignment(DataRefImpl Sec) const {
+  return 1;
+}
+
+bool DXContainerObjectFile::isSectionCompressed(DataRefImpl Sec) const {
+  return false;
+}
+
+bool DXContainerObjectFile::isSectionText(DataRefImpl Sec) const {
+  return false;
+}
+
+bool DXContainerObjectFile::isSectionData(DataRefImpl Sec) const {
+  return false;
+}
+
+bool DXContainerObjectFile::isSectionBSS(DataRefImpl Sec) const {
+  return false;
+}
+
+bool DXContainerObjectFile::isSectionVirtual(DataRefImpl Sec) const {
+  return false;
+}
+
+relocation_iterator
+DXContainerObjectFile::section_rel_begin(DataRefImpl Sec) const {
+  return relocation_iterator(RelocationRef());
+}
+
+relocation_iterator
+DXContainerObjectFile::section_rel_end(DataRefImpl Sec) const {
+  return relocation_iterator(RelocationRef());
+}
+
+void DXContainerObjectFile::moveRelocationNext(DataRefImpl &Rel) const {}
+
+uint64_t DXContainerObjectFile::getRelocationOffset(DataRefImpl Rel) const {
+  return 0;
+}
+
+symbol_iterator
+DXContainerObjectFile::getRelocationSymbol(DataRefImpl Rel) const {
+  return symbol_iterator(SymbolRef());
+}
+
+uint64_t DXContainerObjectFile::getRelocationType(DataRefImpl Rel) const {
+  return 0;
+}
+
+void DXContainerObjectFile::getRelocationTypeName(
+    DataRefImpl Rel, SmallVectorImpl<char> &Result) const {}
+
+section_iterator DXContainerObjectFile::section_begin() const {
+  DataRefImpl Sec;
+  Sec.p = reinterpret_cast<uintptr_t>(Parts.begin());
+  return section_iterator(SectionRef(Sec, this));
+}
+section_iterator DXContainerObjectFile::section_end() const {
+  DataRefImpl Sec;
+  Sec.p = reinterpret_cast<uintptr_t>(Parts.end());
+  return section_iterator(SectionRef(Sec, this));
+}
+
+uint8_t DXContainerObjectFile::getBytesInAddress() const { return 4; }
+
+StringRef DXContainerObjectFile::getFileFormatName() const {
+  return "DirectX Container";
+}
+
+Triple::ArchType DXContainerObjectFile::getArch() const { return Triple::dxil; }
+
+Expected<SubtargetFeatures> DXContainerObjectFile::getFeatures() const {
+  return SubtargetFeatures();
+}
+
+Error DXContainerObjectFile::printSymbolName(raw_ostream &OS,
+                                             DataRefImpl Symb) const {
+  return make_error<DXNotSupportedError>("Symbol names");
+}
+
+Expected<std::unique_ptr<DXContainerObjectFile>>
+ObjectFile::createDXContainerObjectFile(MemoryBufferRef Object) {
+  auto ExC = DXContainer::create(Object);
+  if (!ExC)
+    return ExC.takeError();
+  std::unique_ptr<DXContainerObjectFile> Obj(new DXContainerObjectFile(*ExC));
+  return std::move(Obj);
+}
diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp
index c62944ad3eeba..112927ed69e84 100644
--- a/llvm/lib/Object/Object.cpp
+++ b/llvm/lib/Object/Object.cpp
@@ -124,6 +124,8 @@ LLVMBinaryType LLVMBinaryGetType(LLVMBinaryRef BR) {
         return LLVMBinaryTypeOffload;
       case ID_Wasm:
         return LLVMBinaryTypeWasm;
+      case ID_DXContainer:
+        return LLVMBinaryTypeDXcontainer;
       case ID_StartObjects:
       case ID_EndObjects:
         llvm_unreachable("Marker types are not valid binary kinds!");
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 6a226a3bbdbca..b0e4ea0a51ba1 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -15,6 +15,7 @@
 #include "llvm/BinaryFormat/Magic.h"
 #include "llvm/Object/Binary.h"
 #include "llvm/Object/COFF.h"
+#include "llvm/Object/DXContainer.h"
 #include "llvm/Object/Error.h"
 #include "llvm/Object/MachO.h"
 #include "llvm/Object/Wasm.h"
@@ -165,7 +166,6 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type,
   case file_magic::goff_object:
   case file_magic::cuda_fatbinary:
   case file_magic::offload_binary:
-  case file_magic::dxcontainer_object:
   case file_magic::offload_bundle:
   case file_magic::offload_bundle_compressed:
   case file_magic::spirv_object:
@@ -201,6 +201,8 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type,
     return createXCOFFObjectFile(Object, Binary::ID_XCOFF64);
   case file_magic::wasm_object:
     return createWasmObjectFile(Object);
+  case file_magic::dxcontainer_object:
+    return createDXContainerObjectFile(Object);
   }
   llvm_unreachable("Unexpected Object File Type");
 }
diff --git a/llvm/lib/Object/SymbolicFile.cpp b/llvm/lib/Object/SymbolicFile.cpp
index e87ecb1491090..47295e6027f2c 100644
--- a/llvm/lib/Object/SymbolicFile.cpp
+++ b/llvm/lib/Object/SymbolicFile.cpp
@@ -68,6 +68,7 @@ SymbolicFile::createSymbolicFile(MemoryBufferRef Object, file_magic Type,
   case file_magic::xcoff_object_32:
   case file_magic::xcoff_object_64:
   case file_magic::wasm_object:
+  case file_magic::dxcontainer_object:
     return ObjectFile::createObjectFile(Object, Type, InitContent);
   case file_magic::coff_import_library:
     return std::unique_ptr<SymbolicFile>(new COFFImportFile(Object));
@@ -123,6 +124,7 @@ bool SymbolicFile::isSymbolicFile(file_magic Type, const LLVMContext *Context) {
   case file_magic::elf_relocatable:
   case file_magic::macho_object:
   case file_magic::coff_object:
+  case file_magic::dxcontainer_object:
     return true;
   default:
     return false;
diff --git a/llvm/test/tools/llvm-objdump/DXContainer/part-headers.yaml b/llvm/test/tools/llvm-objdump/DXContainer/part-headers.yaml
new file mode 100644
index 0000000000000..dd1ffb634e996
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/DXContainer/part-headers.yaml
@@ -0,0 +1,58 @@
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objdump -h %t | FileCheck %s --check-prefix=HEADERS
+# RUN: llvm-objdump -s %t | FileCheck %s --check-prefix=CONTENTS
+
+#HEADERS:     Idx Name          Size     VMA      Type
+#HEADERS-NEXT:  0 FKE0          00000008 0000003c
+#HEADERS-NEXT:  1 FKE1          00000008 0000004c
+#HEADERS-NEXT:  2 FKE2          00000008 0000005c
+#HEADERS-NEXT:  3 FKE3          00000078 0000006c
+#HEADERS-NEXT:  4 FKE4          00000698 000000ec
+#HEADERS-NEXT:  5 FKE5          00000014 0000078c
+#HEADERS-NEXT:  6 DXIL          0000001c 000007a8
+
+#CONTENTS: Contents of section FKE0:
+#CONTENTS: Contents of section FKE1:
+#CONTENTS: Contents of section FKE2:
+#CONTENTS: Contents of section FKE3:
+#CONTENTS: Contents of section FKE4:
+#CONTENTS: Contents of section FKE5:
+#CONTENTS: Contents of section DXIL:
+#CONTENTS-NEXT: 07a8 65000500 08000000 4458494c 05010000  e.......DXIL....
+#CONTENTS-NEXT: 07b8 10000000 04000000 4243c0de           ........BC..
+
+--- !dxcontainer
+Header:
+  Hash:            [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+                     0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
+  Version:
+    Major:           1
+    Minor:           0
+  FileSize:        3548
+  PartCount:       7
+  PartOffsets:     [ 60, 76, 92, 108, 236, 1932, 1960 ]
+Parts:
+  - Name:            FKE0
+    Size:            8
+  - Name:            FKE1
+    Size:            8
+  - Name:            FKE2
+    Size:            8
+  - Name:            FKE3
+    Size:            120
+  - Name:            FKE4
+    Size:            1688
+  - Name:            FKE5
+    Size:            20
+  - Name:            DXIL
+    Size:            28
+    Program:
+      MajorVersion:    6
+      MinorVersion:    5
+      ShaderKind:      5
+      Size:            8
+      DXILMajorVersion: 1
+      DXILMinorVersion: 5
+      DXILSize:        4
+      DXIL:            [ 0x42, 0x43, 0xC0, 0xDE, ]
+...
diff --git a/llvm/tools/llvm-objdump/CMakeLists.txt b/llvm/tools/llvm-objdump/CMakeLists.txt
index 7e3197f0a0bd3..41d301cd3d77d 100644
--- a/llvm/tools/llvm-objdump/CMakeLists.txt
+++ b/llvm/tools/llvm-objdump/CMakeLists.txt
@@ -28,6 +28,7 @@ add_llvm_tool(llvm-objdump
   llvm-objdump.cpp
   SourcePrinter.cpp
   COFFDump.cpp
+  DXContainerDump.cpp
   ELFDump.cpp
   MachODump.cpp
   OffloadDump.cpp
diff --git a/llvm/tools/llvm-objdump/DXContainerDump.cpp b/llvm/tools/llvm-objdump/DXContainerDump.cpp
new file mode 100644
index 0000000000000..8ca01873f2ad8
--- /dev/null
+++ b/llvm/tools/llvm-objdump/DXContainerDump.cpp
@@ -0,0 +1,30 @@
+//===-- DXContainerDump.cpp - DXContainer-specific dumper -----------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file implements the DXContainer-specific dumper for llvm-objdump.
+///
+//===----------------------------------------------------------------------===//
+
+#include "llvm-objdump.h"
+#include "llvm/Object/DXContainer.h"
+
+using namespace llvm;
+
+namespace {
+class DXContainerDumper : public objdump::Dumper {
+public:
+  DXContainerDumper(const object::DXContainerObjectFile &Obj)
+      : objdump::Dumper(Obj) {}
+};
+} // namespace
+
+std::unique_ptr<objdump::Dumper> llvm::objdump::createDXContainerDumper(
+    const object::DXContainerObjectFile &Obj) {
+  return std::make_unique<DXContainerDumper>(Obj);
+}
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 0316c4ba51da6..60365a698433c 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -50,6 +50,7 @@
 #include "llvm/Object/BuildID.h"
 #include "llvm/Object/COFF.h"
 #include "llvm/Object/COFFImportFile.h"
+#include "llvm/Object/DXContainer.h"
 #include "llvm/Object/ELFObjectFile.h"
 #include "llvm/Object/ELFTypes.h"
 #include "llvm/Object/FaultMapParser.h"
@@ -386,6 +387,8 @@ static Expected<std::unique_ptr<Dumper>> createDumper(const ObjectFile &Obj) {
     return createWasmDumper(*O);
   if (const auto *O = dyn_cast<XCOFFObjectFile>(&Obj))
     return createXCOFFDumper(*O);
+  if (const auto *O = dyn_cast<DXContainerObjectFile>(&Obj))
+    return createDXContainerDumper(*O);
 
   return createStringError(errc::invalid_argument,
                            "unsupported object file format");
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.h b/llvm/tools/llvm-objdump/llvm-objdump.h
index ce0642950ebdd..3525be9a5314a 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.h
+++ b/llvm/tools/llvm-objdump/llvm-objdump.h
@@ -36,6 +36,7 @@ class ELFObjectFileBase;
 class MachOObjectFile;
 class WasmObjectFile;
 class XCOFFObjectFile;
+class DXContainer;
 } // namespace object
 
 namespace objdump {
@@ -105,6 +106,8 @@ std::unique_ptr<Dumper> createELFDumper(const object::ELFObjectFileBase &Obj);
 std::unique_ptr<Dumper> createMachODumper(const object::MachOObjectFile &Obj);
 std::unique_ptr<Dumper> createWasmDumper(const object::WasmObjectFile &Obj);
 std::unique_ptr<Dumper> createXCOFFDumper(const object::XCOFFObjectFile &Obj);
+std::unique_ptr<Dumper>
+createDXContainerDumper(const object::DXContainerObjectFile &Obj);
 
 // Various helper functions.
 

#HEADERS-NEXT: 5 FKE5 00000014 0000078c
#HEADERS-NEXT: 6 DXIL 0000001c 000007a8

#CONTENTS: Contents of section FKE0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the FKE0 content not useful?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the first line of each section to the test (which for the smaller sections will be everything). Since they're not known named sections with data that the YAML represents, the encoder just fills them with 0's.

../llvm/test/tools/llvm-objdump/DXContainer/part-headers.yaml
Copy link
Contributor

@bogner bogner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Makes debugging shader flags as simple as llvm-objdump --section=SFI0 -s and should be helpful for root signatures as well.

A few comments on the error handling strategy for things that don't exist in the format, but generally this looks good.

Comment on lines 608 to 616
Expected<StringRef> getSymbolName(DataRefImpl) const override { return ""; }
Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
uint64_t getSymbolValueImpl(DataRefImpl Symb) const override { return 0; }
uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override {
return 0;
}
Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override {
return SymbolRef::Type::ST_Unknown;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can getSymbolName and getSymbolType return errors like the other symbol-related Expected<T> functions here? Alternatively, the specific symbol APIs could probably all be made llvm_unreachable() as in my other suggestion, as I don't think they should be dynamically reachable.

Comment on lines 610 to 613
uint64_t getSymbolValueImpl(DataRefImpl Symb) const override { return 0; }
uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override {
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can probably be replaced with llvm_unreachable("DXContainer does not have symbols") or something like that. Similarly for getSymbolFlags and moveSymbolNext below - they should never actually be called since the symbol iterator is an empty list.

basic_symbol_iterator symbol_end() const override {
return basic_symbol_iterator(SymbolRef());
}
bool is64Bit() const override { return 0; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool is64Bit() const override { return 0; }
bool is64Bit() const override { return false; }

Comment on lines +593 to +599
bool DXContainerObjectFile::isSectionText(DataRefImpl Sec) const {
return false;
}

bool DXContainerObjectFile::isSectionData(DataRefImpl Sec) const {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually see where these APIs are used, but arguably the DXIL section could be text and the other sections data I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wasn't sure what to do about DXIL. I'm not sure if it should be Text or Bitcode (both are potentially reasonable). My gut is actually bitcode so we can create an IRObject from it to disassemble, but I'd like to defer that.

I suppose we could make everything else data sections. It isn't really what they traditionally mean by data because it isn't constant data referred to by the program.

These are mostly used during symbol dumping to denote what type of section a symbol points into. Are you okay pushing off any work on this into subsequent changes when we can figure out how to handle other features? Alternatively I could just make isSectionData return true for now and then everything is just data.

Comment on lines 619 to 623
void DXContainerObjectFile::moveRelocationNext(DataRefImpl &Rel) const {}

uint64_t DXContainerObjectFile::getRelocationOffset(DataRefImpl Rel) const {
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relocation APIs could probably also be unreachable.

Expected<uint64_t>
DXContainerObjectFile::getSymbolAddress(DataRefImpl Symb) const {
return make_error<DXNotSupportedError>("Symbol addresses");
}

uint64_t DXContainerObjectFile::getSymbolValueImpl(DataRefImpl Symb) const {
llvm_unreachable("DXContainer does not support symbols");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bogner @llvm-beanz I think the DXContainerObjectFile should present as if it had empty symbol and relocation tables, rather than making these operations unreachable.

From a design perspective you should be able to iterate over the set of symbols and relocations in an object file, and empty sets are perfectly legal.

As a practical matter presenting empty sets will allow llvm-objdump -r and llvm-objdump -t to behave sensibly, whereas unreachable will cause them to crash.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think what you're saying here is in conflict to having llvm_unreachable here. With this patch llvm-objdump -r produces the output:

>bin/llvm-objdump -r part-headers.yaml.tmp

:       file format directx container

and llvm-objdump -t produces:

> bin/llvm-objdump -t part-headers.yaml.tmp

:       file format directx container

SYMBOL TABLE:

The iterators are implemented and all effectively return end iterators so that the result is an empty set. The only way you'd really hit these unreachable is if you tried to access or increment one of the iterators, and since they would be invalid, that would always be a logic error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're totally right. My bad!

LGTM. :)

@@ -0,0 +1,30 @@
//===-- DXContainerDump.cpp -----------------------------------------------===//
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//===----------------------------------------------------------------------===//

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the DirectX Binary Container. I am reviewing how code integrates with lib/Object and tools/llvm-objdump. Looks good!

Expected<uint64_t>
DXContainerObjectFile::getSymbolAddress(DataRefImpl Symb) const {
return make_error<DXNotSupportedError>("Symbol addresses");
}

uint64_t DXContainerObjectFile::getSymbolValueImpl(DataRefImpl Symb) const {
llvm_unreachable("DXContainer does not support symbols");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're totally right. My bad!

LGTM. :)

@llvm-beanz llvm-beanz merged commit 2fe9643 into llvm:main Aug 4, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/22256

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
6.850 [82/34/681] Generating version list for clang_rt.nsan-dynamic-x86_64
6.859 [81/34/682] Building CXX object compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_buffer_queue.cpp.o
6.872 [80/34/683] Linking CXX static library /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.ctx_profile.a
6.890 [79/34/684] Building CXX object compiler-rt/lib/nsan/CMakeFiles/RTNsan_dynamic_version_script_dummy.x86_64.dir/dummy.cpp.o
6.903 [78/34/685] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.x86_64.dir/FuzzerUtilWindows.cpp.o
6.960 [77/34/686] Building CXX object compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_x86_64.cpp.o
6.974 [76/34/687] Linking CXX shared library /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.nsan.so
6.980 [75/34/688] Building CXX object compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_utils.cpp.o
7.047 [74/34/689] Linking CXX static library /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.xray.a
7.076 [73/34/690] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o
FAILED: compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -fno-lto -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -std=c++17 -MD -MT compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -MF compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o.d -o compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
Cannot find interchangeable instruction.
UNREACHABLE executed at /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:997!
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: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -fno-lto -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -std=c++17 -MD -MT compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -MF compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o.d -o compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN5scudo18PageReleaseContext21markRangeAsAllCountedEmmmmm"
 #0 0x000056511fa8692f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x429d92f)
 #1 0x000056511fa83bd4 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x429abd4)
 #2 0x000056511f9c2818 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f874f911420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f874f3de00b raise /build/glibc-B3wQXB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f874f3bd859 abort /build/glibc-B3wQXB/glibc-2.31/stdlib/abort.c:81:7
 #6 0x000056511f9ce88e (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x41e588e)
 #7 0x000056512155e1a3 (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x5d751a3)
 #8 0x000056512156ba11 (anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(llvm::Instruction*) const SLPVectorizer.cpp:0:0
 #9 0x0000565121600b24 getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&) SLPVectorizer.cpp:0:0
#10 0x000056512162811e (anonymous namespace)::InstructionsCompatibilityAnalysis::buildInstructionsState(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP const&, bool, bool, bool) (.constprop.0) SLPVectorizer.cpp:0:0
#11 0x000056512166847f llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x5e7f47f)
#12 0x000056512166a1b4 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::'lambda'(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&)::operator()(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&) const SLPVectorizer.cpp:0:0
#13 0x000056512166c480 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x5e83480)
#14 0x000056512166cd47 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x5e83d47)
#15 0x000056512166db35 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.0) SLPVectorizer.cpp:0:0
#16 0x000056512166e643 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x5e85643)
#17 0x0000565120ba2a26 llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#18 0x000056511f3df7f0 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x3bf67f0)
#19 0x000056511cbc7f46 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#20 0x000056511f3dfcfe llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x3bf6cfe)
#21 0x000056511cbc8636 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#22 0x000056511f3dd8f0 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x3bf48f0)
#23 0x000056511fd43b08 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#24 0x000056511fd472df clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x455e2df)
#25 0x000056512047bda4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x4c92da4)
#26 0x0000565121ec063c clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x66d763c)
#27 0x000056512047c1d8 clang::CodeGenAction::ExecuteAction() (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang+++0x4c931d8)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-qemu running on sanitizer-buildbot3 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/139/builds/18094

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[44/63] Linking CXX static library lib/linux/libclang_rt.gwp_asan-x86_64.a
[45/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/report.cpp.o
[46/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/linux.cpp.o
[47/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/timing.cpp.o
[48/63] Building CXX object lib/gwp_asan/CMakeFiles/RTGwpAsanOptionsParser.x86_64.dir/optional/options_parser.cpp.o
[49/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/timing.cpp.o
[50/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/string_utils.cpp.o
[51/63] Building CXX object lib/gwp_asan/CMakeFiles/RTGwpAsan.x86_64.dir/guarded_pool_allocator.cpp.o
[52/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/string_utils.cpp.o
[53/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o
FAILED: lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o 
/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang++ --target=x86_64-linux-gnu  -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fno-lto -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -MF lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o.d -o lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -c /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
Cannot find interchangeable instruction.
UNREACHABLE executed at /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:997!
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: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang++ --target=x86_64-linux-gnu -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fno-lto -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -MF lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o.d -o lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -c /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN5scudo18PageReleaseContext21markRangeAsAllCountedEmmmmm"
 #0 0x000056dcb84bdef8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87e4ef8)
 #1 0x000056dcb84bb615 llvm::sys::RunSignalHandlers() (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87e2615)
 #2 0x000056dcb84231a6 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000710b1fa45250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #4 0x0000710b1faa3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #5 0x0000710b1fa4519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #6 0x0000710b1fa28902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
 #7 0x000056dcb842b9ff (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87529ff)
 #8 0x000056dcb9af4391 (anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(llvm::Instruction*) const SLPVectorizer.cpp:0:0
 #9 0x000056dcb9a81e3e getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&) SLPVectorizer.cpp:0:0
#10 0x000056dcb9a7f1c7 (anonymous namespace)::InstructionsCompatibilityAnalysis::buildInstructionsState(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP const&, bool, bool, bool) SLPVectorizer.cpp:0:0
#11 0x000056dcb9ad6eb0 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dfdeb0)
#12 0x000056dcb9ad9592 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&) const SLPVectorizer.cpp:0:0
#13 0x000056dcb9ad829b llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dff29b)
#14 0x000056dcb9ad3549 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dfa549)
#15 0x000056dcb9ad1c3b llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9df8c3b)
#16 0x000056dcb9ad11f6 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9df81f6)
#17 0x000056dcb966c48d llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#18 0x000056dcb7eb728a llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81de28a)
#19 0x000056dcb5d69c0d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) AMDGPUTargetMachine.cpp:0:0
#20 0x000056dcb7ebb117 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81e2117)
#21 0x000056dcb5d6a35d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) AMDGPUTargetMachine.cpp:0:0
#22 0x000056dcb7eb636a llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81dd36a)
#23 0x000056dcb8c20a1f (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#24 0x000056dcb8c18056 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x8f3f056)
#25 0x000056dcb8c2a205 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x8f51205)
#26 0x000056dcba66aa59 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0xa991a59)
#27 0x000056dcb91bf506 clang::FrontendAction::Execute() (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x94e6506)
Step 11 (scudo x86_64) failure: scudo x86_64 (failure)
...
[44/63] Linking CXX static library lib/linux/libclang_rt.gwp_asan-x86_64.a
[45/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/report.cpp.o
[46/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/linux.cpp.o
[47/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/timing.cpp.o
[48/63] Building CXX object lib/gwp_asan/CMakeFiles/RTGwpAsanOptionsParser.x86_64.dir/optional/options_parser.cpp.o
[49/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/timing.cpp.o
[50/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/string_utils.cpp.o
[51/63] Building CXX object lib/gwp_asan/CMakeFiles/RTGwpAsan.x86_64.dir/guarded_pool_allocator.cpp.o
[52/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/string_utils.cpp.o
[53/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o
FAILED: lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o 
/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang++ --target=x86_64-linux-gnu  -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fno-lto -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -MF lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o.d -o lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -c /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
Cannot find interchangeable instruction.
UNREACHABLE executed at /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:997!
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: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang++ --target=x86_64-linux-gnu -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fno-lto -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -MF lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o.d -o lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -c /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN5scudo18PageReleaseContext21markRangeAsAllCountedEmmmmm"
 #0 0x000056dcb84bdef8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87e4ef8)
 #1 0x000056dcb84bb615 llvm::sys::RunSignalHandlers() (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87e2615)
 #2 0x000056dcb84231a6 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000710b1fa45250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #4 0x0000710b1faa3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #5 0x0000710b1fa4519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #6 0x0000710b1fa28902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
 #7 0x000056dcb842b9ff (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87529ff)
 #8 0x000056dcb9af4391 (anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(llvm::Instruction*) const SLPVectorizer.cpp:0:0
 #9 0x000056dcb9a81e3e getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&) SLPVectorizer.cpp:0:0
#10 0x000056dcb9a7f1c7 (anonymous namespace)::InstructionsCompatibilityAnalysis::buildInstructionsState(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP const&, bool, bool, bool) SLPVectorizer.cpp:0:0
#11 0x000056dcb9ad6eb0 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dfdeb0)
#12 0x000056dcb9ad9592 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&) const SLPVectorizer.cpp:0:0
#13 0x000056dcb9ad829b llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dff29b)
#14 0x000056dcb9ad3549 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dfa549)
#15 0x000056dcb9ad1c3b llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9df8c3b)
#16 0x000056dcb9ad11f6 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9df81f6)
#17 0x000056dcb966c48d llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#18 0x000056dcb7eb728a llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81de28a)
#19 0x000056dcb5d69c0d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) AMDGPUTargetMachine.cpp:0:0
#20 0x000056dcb7ebb117 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81e2117)
#21 0x000056dcb5d6a35d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) AMDGPUTargetMachine.cpp:0:0
#22 0x000056dcb7eb636a llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81dd36a)
#23 0x000056dcb8c20a1f (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#24 0x000056dcb8c18056 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x8f3f056)
#25 0x000056dcb8c2a205 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x8f51205)
#26 0x000056dcba66aa59 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0xa991a59)
#27 0x000056dcb91bf506 clang::FrontendAction::Execute() (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x94e6506)
Step 12 (scudo x86_64_qemu) failure: scudo x86_64_qemu (failure)
...
[44/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/timing.cpp.o
[45/63] Building CXX object lib/gwp_asan/CMakeFiles/RTGwpAsan.x86_64.dir/guarded_pool_allocator.cpp.o
[46/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/report.cpp.o
[47/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/string_utils.cpp.o
[48/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-x86_64.dir/linux.cpp.o
[49/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/flags_parser.cpp.o
[50/63] Building CXX object lib/gwp_asan/CMakeFiles/clang_rt.gwp_asan-x86_64.dir/guarded_pool_allocator.cpp.o
[51/63] Linking CXX static library lib/linux/libclang_rt.gwp_asan-x86_64.a
[52/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/string_utils.cpp.o
[53/63] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o
FAILED: lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o 
/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang++ --target=x86_64-linux-gnu  -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fno-lto -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -MF lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o.d -o lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -c /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
Cannot find interchangeable instruction.
UNREACHABLE executed at /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:997!
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: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang++ --target=x86_64-linux-gnu -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fno-lto -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -MF lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o.d -o lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-x86_64.dir/wrappers_cpp.cpp.o -c /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN5scudo18PageReleaseContext21markRangeAsAllCountedEmmmmm"
 #0 0x00005a3c5e751ef8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87e4ef8)
 #1 0x00005a3c5e74f615 llvm::sys::RunSignalHandlers() (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87e2615)
 #2 0x00005a3c5e6b71a6 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000766471245250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #4 0x00007664712a3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #5 0x000076647124519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #6 0x0000766471228902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
 #7 0x00005a3c5e6bf9ff (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x87529ff)
 #8 0x00005a3c5fd88391 (anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(llvm::Instruction*) const SLPVectorizer.cpp:0:0
 #9 0x00005a3c5fd15e3e getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&) SLPVectorizer.cpp:0:0
#10 0x00005a3c5fd131c7 (anonymous namespace)::InstructionsCompatibilityAnalysis::buildInstructionsState(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP const&, bool, bool, bool) SLPVectorizer.cpp:0:0
#11 0x00005a3c5fd6aeb0 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dfdeb0)
#12 0x00005a3c5fd6d592 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&) const SLPVectorizer.cpp:0:0
#13 0x00005a3c5fd6c29b llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dff29b)
#14 0x00005a3c5fd67549 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9dfa549)
#15 0x00005a3c5fd65c3b llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9df8c3b)
#16 0x00005a3c5fd651f6 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x9df81f6)
#17 0x00005a3c5f90048d llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#18 0x00005a3c5e14b28a llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81de28a)
#19 0x00005a3c5bffdc0d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) AMDGPUTargetMachine.cpp:0:0
#20 0x00005a3c5e14f117 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81e2117)
#21 0x00005a3c5bffe35d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) AMDGPUTargetMachine.cpp:0:0
#22 0x00005a3c5e14a36a llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x81dd36a)
#23 0x00005a3c5eeb4a1f (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#24 0x00005a3c5eeac056 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x8f3f056)
#25 0x00005a3c5eebe205 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x8f51205)
#26 0x00005a3c608fea59 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0xa991a59)
#27 0x00005a3c5f453506 clang::FrontendAction::Execute() (/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/bin/clang+++0x94e6506)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-key-instructions running on sie-linux-worker5 while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/208/builds/3375

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
55.145 [204/10/583] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/flags.cpp.o
55.349 [203/10/584] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/mem_map.cpp.o
55.521 [202/10/585] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/linux.cpp.o
55.564 [201/10/586] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/mem_map_fuchsia.cpp.o
55.723 [200/10/587] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/mem_map_linux.cpp.o
55.795 [199/10/588] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/release.cpp.o
56.079 [198/10/589] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/report.cpp.o
56.083 [197/10/590] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/report_linux.cpp.o
56.531 [196/10/591] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-x86_64.dir/timing.cpp.o
56.712 [195/10/592] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o
FAILED: compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o 
/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -fno-lto -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -std=c++17 -MD -MT compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -MF compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o.d -o compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -c /home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
Cannot find interchangeable instruction.
UNREACHABLE executed at /home/buildbot/buildbot-root/llvm-ki/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:997!
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: /home/buildbot/buildbot-root/llvm-ki/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/../.. -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -Werror=conversion -Wall -Wextra -pedantic -g -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-pedantic -fno-lto -O3 -Werror=thread-safety -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -std=c++17 -MD -MT compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -MF compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o.d -o compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.x86_64.dir/wrappers_cpp.cpp.o -c /home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbot/buildbot-root/llvm-ki/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN5scudo18PageReleaseContext21markRangeAsAllCountedEmmmmm"
 #0 0x00005981ebb8ae30 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x4238e30)
 #1 0x00005981ebb87adf llvm::sys::RunSignalHandlers() (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x4235adf)
 #2 0x00005981ebac80c8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000735b6249f520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x0000735b624f39fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000735b624f39fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x0000735b624f39fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x0000735b6249f476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x0000735b624857f3 abort ./stdlib/abort.c:81:7
 #9 0x00005981ebad4e6e (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x4182e6e)
#10 0x00005981ed6634f3 (anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(llvm::Instruction*) const SLPVectorizer.cpp:0:0
#11 0x00005981ed6637d7 llvm::Value* const* std::__find_if<llvm::Value* const*, __gnu_cxx::__ops::_Iter_negate<getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&)::'lambda0'(llvm::Value*)>>(llvm::Value* const*, llvm::Value* const*, __gnu_cxx::__ops::_Iter_negate<getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&)::'lambda0'(llvm::Value*)>, std::random_access_iterator_tag) (.constprop.0) SLPVectorizer.cpp:0:0
#12 0x00005981ed6caacd getSameOpcode(llvm::ArrayRef<llvm::Value*>, llvm::TargetLibraryInfo const&) SLPVectorizer.cpp:0:0
#13 0x00005981ed705fab (anonymous namespace)::InstructionsCompatibilityAnalysis::buildInstructionsState(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP const&, bool, bool, bool) (.constprop.0) SLPVectorizer.cpp:0:0
#14 0x00005981ed757768 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x5e05768)
#15 0x00005981ed7595e3 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::'lambda'(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&)::operator()(std::map<long, unsigned int, std::less<long>, std::allocator<std::pair<long const, unsigned int>>> const&) const SLPVectorizer.cpp:0:0
#16 0x00005981ed75b8d0 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x5e098d0)
#17 0x00005981ed75c169 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x5e0a169)
#18 0x00005981ed75d7cc llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.0) SLPVectorizer.cpp:0:0
#19 0x00005981ed75e3b1 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x5e0c3b1)
#20 0x00005981ecc72ad6 llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#21 0x00005981eb4e0797 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x3b8e797)
#22 0x00005981e8c47f16 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#23 0x00005981eb4e0d09 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x3b8ed09)
#24 0x00005981e8c48606 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#25 0x00005981eb4deab4 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x3b8cab4)
#26 0x00005981ebe37003 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#27 0x00005981ebe3b5a3 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/buildbot/buildbot-root/llvm-ki/build/./bin/clang+++0x44e95a3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DX] Objdump support for dumping section listings
7 participants