[PATCH] D133584: [DAGCombiner] [AMDGPU] Allow vector loads in MatchLoadCombine

Jeffrey Byrnes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 08:59:49 PDT 2022


jrbyrnes created this revision.
Herald added subscribers: kosarev, ecnelises, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
jrbyrnes requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Since SROA chooses promotion based on reaching load / stores of allocas, we may run into scenarios in which we alloca a vector, but promote it to an integer. The result of which is the familiar LoadCombine pattern (i.e. ZEXT, SHL, OR). However, instead of coming directly from distinct loads, the elements to be combined are coming from ExtractVectorElements which stem from a shared load.

This patch identifies such a pattern and combines it into a load.

Change-Id: I0bc06588f11e88a0a975cde1fd71e9143e6c42dd


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133584

Files:
  llvm/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/combine-vload-extract.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133584.459089.patch
Type: text/x-patch
Size: 13306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220909/e7c97f84/attachment.bin>


More information about the llvm-commits mailing list