[all-commits] [llvm/llvm-project] 3fc40b: X86: gate all vmovsh instructions on FP16 support.

Tim Northover via All-commits all-commits at lists.llvm.org
Wed Feb 9 04:29:30 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3fc40b6e6628cd3206d5aaf2bfb864add7d74fe1
      https://github.com/llvm/llvm-project/commit/3fc40b6e6628cd3206d5aaf2bfb864add7d74fe1
  Author: Tim Northover <tnorthover at apple.com>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrAVX512.td

  Log Message:
  -----------
  X86: gate all vmovsh instructions on FP16 support.

Previously the `let Predicates = ...` line only applied to the rr version, and
so VMOVSH was being emitted whenever HasAVX512 (the default) applied. This is
not right.


  Commit: 00e372137c8a604b59b995131cebf2d84f097544
      https://github.com/llvm/llvm-project/commit/00e372137c8a604b59b995131cebf2d84f097544
  Author: Tim Northover <tnorthover at apple.com>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrAtomics.td
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-cmpxchg-128.mir
    M llvm/test/CodeGen/AArch64/arm64-atomic-128.ll

  Log Message:
  -----------
  AArch64: do not use xzr for ldxp -> stxp dataflow.

If the result of a cmpxchg is unused, regalloc chooses `xzr` for the defs of
CMP_SWAP_128*. However, on the failure path this gets expanded to a LDXP ->
STXP to store the original value (to ensure no tearing occurred). This
unintentionally nulls out half of the value.

So instead use GPR64common for these defs, so regalloc has to choose a real
one.


Compare: https://github.com/llvm/llvm-project/compare/db28a45617be...00e372137c8a


More information about the All-commits mailing list