[PATCH] D39927: [X86] Allow X86ISD::Wrapper to be folded into the base of gather/scatter address

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 15:26:06 PST 2017


craig.topper created this revision.

If the base of our gather corresponds to something contained in X86ISD::Wrapper we should be able to fold it into the address.

This patch refactors some of the address matching to more fully use the X86ISelAddressMode struct and the getAddressOperands helper. A new helper function matchVectorAddress is added to call matchWrapper or fall back to matchAddressBase.

We should also be able to support constant offsets from a wrapper, but I'll look into that in a future patch. We may even be able to completely reuse matchAddress here, but I wanted to start simple and work up to it.


https://reviews.llvm.org/D39927

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39927.122541.patch
Type: text/x-patch
Size: 4987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171110/8cb9a2ec/attachment.bin>


More information about the llvm-commits mailing list