[all-commits] [llvm/llvm-project] 2bc28c: [X86] Add a dependency breaking xor before any gat...

Phoebe Wang via All-commits all-commits at lists.llvm.org
Wed Oct 27 20:45:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bc28c6f825ec7b33854288970c6646e17425d62
      https://github.com/llvm/llvm-project/commit/2bc28c6f825ec7b33854288970c6646e17425d62
  Author: Phoebe Wang <pengfei.wang at intel.com>
  Date:   2021-10-28 (Thu, 28 Oct 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/masked_gather.ll
    M llvm/test/CodeGen/X86/masked_gather_scatter.ll
    M llvm/test/CodeGen/X86/masked_gather_scatter_widen.ll
    M llvm/test/CodeGen/X86/pr45067.ll

  Log Message:
  -----------
  [X86] Add a dependency breaking xor before any gathers with an undef passthru value.

In the instruction encoding, the passthru register is always
tied to the destination register. The CPU scheduler has to wait
for the last writer of this register to finish executing before
the gather can start. This is true even if the initial mask is
all ones so that the passthru will never be used.

By explicitly zeroing the register we can break the false
dependency. The zero idiom is executed completing by the
register renamer and so is immedately considered ready.

Authored by Craig.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D112505




More information about the All-commits mailing list