[PATCH] D108539: [X86][AVX] Attempt to fold a scaled index into a gather/scatter scale immediate (PR13310)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 23 04:02:47 PDT 2021


RKSimon created this revision.
RKSimon added reviewers: pengfei, craig.topper, spatel, lebedev.ri.
Herald added subscribers: arphaman, hiraditya.
RKSimon requested review of this revision.
Herald added a project: LLVM.

If the index operand for a gather/scatter intrinsic is being scaled (self-addition or a shl-by-immediate) then we may be able to fold that scaling into the intrinsic scale immediate value instead.

I did see if we could perform this with X86DAGToDAGISel::matchAddressRecursively, but adding vector support will be a pretty large task for only a minimal benefit.

Fixes PR13310.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108539

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/masked_gather_scatter.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108539.368062.patch
Type: text/x-patch
Size: 9202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210823/304cd5f1/attachment.bin>


More information about the llvm-commits mailing list