[all-commits] [llvm/llvm-project] 542b61: [MachineLICM] Precommit tests for implicit-def han...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Thu Jun 26 05:04:52 PDT 2025


  Branch: refs/heads/users/atrosinenko/machine-licm-implicit-defs
  Home:   https://github.com/llvm/llvm-project
  Commit: 542b61710904f62ba972022d38c64613f6f52fab
      https://github.com/llvm/llvm-project/commit/542b61710904f62ba972022d38c64613f6f52fab
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    A llvm/test/CodeGen/AArch64/mlicm-implicit-defs.mir

  Log Message:
  -----------
  [MachineLICM] Precommit tests for implicit-def handling


  Commit: a7b994fc43d1cf9e531be272ebde12b3e127d086
      https://github.com/llvm/llvm-project/commit/a7b994fc43d1cf9e531be272ebde12b3e127d086
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    M llvm/lib/CodeGen/MachineLICM.cpp
    M llvm/test/CodeGen/AArch64/mlicm-implicit-defs.mir

  Log Message:
  -----------
  [MachineLICM] Do not rely on hasSideEffect when handling impdefs

Take clobbered registers described as implicit-def operands into
account when deciding if an instruction can be moved.

When hasSideEffect was set to 0 in the definition of LOADgotAUTH,
MultiSource/Benchmarks/Ptrdist/ks/ks test from llvm-test-suite started
to crash. The issue was traced down to MachineLICM pass placing
LOADgotAUTH right after an unrelated copy to x16 like rewriting this
code:

    bb.0:
      renamable $x16 = COPY renamable $x12
      B %bb.1

    bb.1:
      ...
      /* use $x16 */
      ...
      renamable $x20 = LOADgotAUTH target-flags(aarch64-got) @some_variable, implicit-def dead $x16, implicit-def dead $x17, implicit-def dead $nzcv
      /* use $x20 */
      ...

like the following:

    bb.0:
      renamable $x16 = COPY renamable $x12
      renamable $x20 = LOADgotAUTH target-flags(aarch64-got) @some_variable, implicit-def dead $x16, implicit-def dead $x17, implicit-def dead $nzcv
      B %bb.1

    bb.1:
      ...
      /* use $x16 */
      ...
      /* use $x20 */
      ...


  Commit: 079d654b05a4b0b98fc6f137f0d3588543039153
      https://github.com/llvm/llvm-project/commit/079d654b05a4b0b98fc6f137f0d3588543039153
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    M llvm/lib/CodeGen/MachineLICM.cpp
    M llvm/test/CodeGen/AArch64/mlicm-implicit-defs.mir

  Log Message:
  -----------
  Fix hoisting safe dead implicit-defs


Compare: https://github.com/llvm/llvm-project/compare/05c3da95de35...079d654b05a4

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