https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112572
--- Comment #8 from Sam James <sjames at gcc dot gnu.org> --- Bringing MLRegallocEvictAdvisor.cpp.o into a good build then relinking lib/libLLVMCodeGen.so.17 is enough to break it. Some selected diffs: ``` │ llvm::NextPowerOf2(unsigned long): │ /home/sam/git/llvm-project/llvm/include/llvm/Support/MathExtras.h:356 │ inc %rdi │ unsigned int const& std::max<unsigned int>(unsigned int const&, unsigned int const&): │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algobase.h:262 │ +/tmp/build/include/c++/14.0.0/bits/stl_algobase.h:262 │ cmp %eax,%edi │ cmovb %eax,%edi │ llvm::DenseMap<unsigned int, (anonymous namespace)::LIFeatureComponents, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, (anonymous namespace)::LIFeatureComponents> >::grow (unsigned int): │ /home/sam/git/llvm-project/llvm/include/llvm/ADT/DenseMap.h:892 │ mov %edi,0x18(%rbx) │ allocateBuckets(): │ /home/sam/git/llvm-project/llvm/include/llvm/ADT/DenseMap.h:899 │ @@ -321,9 +321,9 @@ │ /home/sam/git/llvm-project/llvm/include/llvm/ADT/DenseMap.h:658 (discriminator 3) │ cmp %r10d,%edx │ je 135 <llvm::DenseMap<unsigned int, (anonymous namespace)::LIFeatureComponents, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, (anonymous namespace)::LIFeatureCo mponents> >::grow(unsigned int)+0x135> │ mov 0xc(%rsp),%r15d │ jmp 199 <llvm::DenseMap<unsigned int, (anonymous namespace)::LIFeatureComponents, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, (anonymous namespace)::LIFeatureCo mponents> >::grow(unsigned int)+0x199> │ initEmpty(): │ /home/sam/git/llvm-project/llvm/include/llvm/ADT/DenseMap.h:658 (discriminator 3) │ - call 288 <.LC133> │ + call 288 <.LC133+0x8> ``` │ std::unique_ptr<llvm::MachineOperand* [], std::default_delete<llvm::MachineOperand* []> >::operator[](unsigned long) const: │ -/tmp/build-reverted/include/c++/14.0.0/bits/unique_ptr.h:726 (discriminator 4) │ +/tmp/build/include/c++/14.0.0/bits/unique_ptr.h:726 (discriminator 4) │ lea 0x0(%rip),%rcx # 16f7 <(anonymous namespace)::MLEvictAdvisor::extractFeatures(llvm::SmallVectorImpl<llvm::LiveInterval const*> const&, llvm::SmallVectorImpl<float>&, unsigned long, long, long, float, llvm::SmallVectorImpl<LRStartEndInfo>&) const [clone .isra.0]+0x16f7> │ R_X86_64_PC32 .LC78-0x4 │ lea 0x0(%rip),%rdx # 16fe <(anonymous namespace)::MLEvictAdvisor::extractFeatures(llvm::SmallVectorImpl<llvm::LiveInterval const*> const&, llvm::SmallVectorImpl<float>&, unsigned long, long, long, float, llvm::SmallVectorImpl<LRStartEndInfo>&) const [clone .isra.0]+0x16fe> │ R_X86_64_PC32 .LC79-0x4 │ mov $0x2d6,%esi │ lea 0x0(%rip),%rdi # 170a <(anonymous namespace)::MLEvictAdvisor::extractFeatures(llvm::SmallVectorImpl<llvm::LiveInterval const*> const&, llvm::SmallVectorImpl<float>&, unsigned long, long, long, float, llvm::SmallVectorImpl<LRStartEndInfo>&) const [clone .isra.0]+0x170a> │ R_X86_64_PC32 .LC80-0x4 │ @@ -2665,9 +2665,9 @@ │ vxorps %xmm3,%xmm3,%xmm3 │ shr %rdx │ or %rax,%rdx │ vcvtsi2ss %rdx,%xmm3,%xmm0 │ vaddss %xmm0,%xmm0,%xmm1 │ jmp 472 <(anonymous namespace)::MLEvictAdvisor::extractFeatures(llvm::SmallVectorImpl<llvm::LiveInterval const*> const&, llvm::SmallVectorImpl<float>&, unsigned long, long, long, float, llvm::Small VectorImpl<LRStartEndInfo>&) const [clone .isra.0]+0x472> │ mov %rax,%rbx │ - jmp 1ad0 <.LC100+0x8d8> │ + jmp 1ad0 <.LC100+0x8f0> ``` ``` │ extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int (llvm::SlotIndex)>, llvm::function_ref<float (llvm::SlotIndex)>, llvm::function_ref<llvm::Mac hineBasicBlock* (llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex): │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algo.h:1897 │ +/tmp/build/include/c++/14.0.0/bits/stl_algo.h:1897 │ cmp %rcx,%r12 │ __sort<LRStartEndInfo*, __gnu_cxx::__ops::_Iter_comp_iter<extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int(llvm::SlotIndex)>, llvm::function_r ef<float(llvm::SlotIndex)>, llvm::function_ref<llvm::MachineBasicBlock*(llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex)::<lambda(LRStartEndInfo, LRStartEndInfo)> > >(): │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algo.h:1897 │ +/tmp/build/include/c++/14.0.0/bits/stl_algo.h:1897 │ je e8 <extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int (llvm::SlotIndex)>, llvm::function_ref<float (llvm::SlotIndex)>, llvm::function_ref<llvm::MachineBasicBlock* (llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex)+0xe8> │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algo.h:1900 │ +/tmp/build/include/c++/14.0.0/bits/stl_algo.h:1900 │ mov %rbx,%rax │ movabs $0xaaaaaaaaaaaaaaab,%rdx │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algo.h:1899 │ - mov %rcx,%rsi │ +/tmp/build/include/c++/14.0.0/bits/stl_algo.h:1899 │ + mov %r15,%rsi │ mov %r12,%rdi │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algo.h:1900 │ +/tmp/build/include/c++/14.0.0/bits/stl_algo.h:1900 │ sar $0x3,%rax │ - mov %rcx,%r15 │ imul %rdx,%rax │ long std::__lg<long>(long): ``` ``` │ __sort<LRStartEndInfo*, __gnu_cxx::__ops::_Iter_comp_iter<extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int(llvm::SlotIndex)>, llvm::function_ref<float(llvm::SlotIndex)>, llvm::function_ref<llvm::MachineBasicBlock*(llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex)::<lambda(LRStartEndInfo, LRStartEndInfo)> > >(): │ -/tmp/build-reverted/include/c++/14.0.0/bits/stl_algo.h:1899 │ +/tmp/build/include/c++/14.0.0/bits/stl_algo.h:1899 │ add %rdx,%rdx │ - call a0 <extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int (llvm::SlotIndex)>, llvm::function_ref<float (llvm::SlotIndex)>, llvm::functi on_ref<llvm::MachineBasicBlock* (llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex)+0xa0> │ + call 9d <extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int (llvm::SlotIndex)>, llvm::function_ref<float (llvm::SlotIndex)>, llvm::functi on_ref<llvm::MachineBasicBlock* (llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex)+0x9d> │ R_X86_64_PC32 .text._ZSt16__introsort_loopIP14LRStartEndInfolN9__gnu_cxx5__ops15_Iter_comp_iterIZ26extractInstructionFeaturesRN4llvm15SmallVectorImplIS0_EEPNS5_13MLModelRunnerENS5_12function_refIFiN S5_9SlotIndexEEEENSB_IFfSC_EEENSB_IFPNS5_17MachineBasicBlockESC_EEEiiiiSC_EUlS0_S0_E_EEEvT_SN_T0_T1_-0x4 │ extractInstructionFeatures(llvm::SmallVectorImpl<LRStartEndInfo>&, llvm::MLModelRunner*, llvm::function_ref<int (llvm::SlotIndex)>, llvm::function_ref<float (llvm::SlotIndex)>, llvm::function_ref<llvm::Mac hineBasicBlock* (llvm::SlotIndex)>, int, int, int, int, llvm::SlotIndex): ``` ``` │ R_X86_64_REX_GOTPCRELX vtable for llvm::RegAllocEvictionAdvisor-0x4 │ vzeroupper │ - jmp 7bb <.LC76+0x7b> │ + jmp 7bb <.LC76+0x83> ```