[all-commits] [llvm/llvm-project] 43a0be: [X86] Record the enclosed register in X86DomainRea...

mbhade-amd via All-commits all-commits at lists.llvm.org
Sun Jun 14 23:13:03 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 43a0be066b5d0f897ae6191820aec4ecd821b32e
      https://github.com/llvm/llvm-project/commit/43a0be066b5d0f897ae6191820aec4ecd821b32e
  Author: mbhade-amd <mbhade at amd.com>
  Date:   2026-06-15 (Mon, 15 Jun 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86DomainReassignment.cpp
    A llvm/test/CodeGen/X86/domain-reassignment-closure-stats.mir

  Log Message:
  -----------
  [X86] Record the enclosed register in X86DomainReassignment::buildClosure (#202534)

buildClosure recorded the seed register Reg in the function-wide
EnclosedEdges map on every worklist iteration instead of CurReg, the
register actually being added to the closure. EnclosedEdges therefore
only ever contained the seed of each closure.

The driver loop in runOnMachineFunction skips registers already present
in EnclosedEdges before starting a new closure. Because only seeds were
recorded, every non-seed member of an already-built closure looked like
a fresh seed, so a redundant closure was built for it and then
immediately discarded by the EnclosedInstrs cross-closure check. The
emitted code is unchanged; the pass just performed redundant work
proportional to closure size.

Key EnclosedEdges by CurReg so each enclosed register is recorded once.

This was found as part of @jlebar's X86 LLVM bug hunt / FuzzX effort:

https://github.com/SemiAnalysisAI/FuzzX/tree/master/x86/bugs/007-domain-reassignment-wrong-enclosed-key

cc @jlebar



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list