[PATCH] D34723: [AMDGPU] truncate left shift

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 16:15:44 PDT 2017


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

We can convert trunc (shl) into shl (trunc) to change from an
expensive 64 bit shift to cheap 32 bit shift in case if shift
amount is known to be less that 32.

I'm also removing alignbit pattern for the left shift as it is
covered by this better optimization.


https://reviews.llvm.org/D34723

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  test/CodeGen/AMDGPU/alignbit-pat.ll
  test/CodeGen/AMDGPU/shift-i64-opts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34723.104306.patch
Type: text/x-patch
Size: 8348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170627/c644fccc/attachment.bin>


More information about the llvm-commits mailing list