[PATCH] D33432: [AMDGPU] Convert shl (add) into add (shl)

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 00:36:19 PDT 2017


rampitec created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl, arsenm.

shl (or|add x, c2), c1 => or|add (shl x, c1), (c2 << c1)
This allows to fold a constant into an address in some cases as
well as to eliminate second shift if the expression is used as
an address and second shift is a result of a GEP.


Repository:
  rL LLVM

https://reviews.llvm.org/D33432

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  test/CodeGen/AMDGPU/shl-add-to-add-shl.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33432.99855.patch
Type: text/x-patch
Size: 4789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170523/e1b3135c/attachment.bin>


More information about the llvm-commits mailing list