[all-commits] [llvm/llvm-project] 79f9df: [X86] Move splat addends from the gather/scatter i...

Phoebe Wang via All-commits all-commits at lists.llvm.org
Mon Oct 25 21:36:22 PDT 2021


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

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

  Log Message:
  -----------
  [X86] Move splat addends from the gather/scatter index operand to the base address

This can avoid a vector add and a constant pool load. Or an explicit broadcast in case of non-constant.

Also reverse the transform any time we encounter a constant index addend that can't be moved to base. In that case pull the constant from base into the index. This reduces code size needed for the displacement since we needed the index add anyway. Limit this to scale of 1 to avoid divisibility and wrap issues.

Authored by Craig.

Reviewed By: craig.topper

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




More information about the All-commits mailing list