[PATCH] D57386: [SelectionDAG] Codesize: don't expand SHIFT to SHIFT_PARTS

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 07:27:29 PST 2019


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: samparker, efriedma, craig.topper, RKSimon, t.p.northover.
Herald added subscribers: kristof.beyls, javed.absar.

And instead just generate a libcall. My motivating example on ARM was a simple:

    
  shl i64 %A, %B
    

for which the code bloat is quite significant. For other targets that also
accept __int128/i128 such as AArch64 and X86, it also seems beneficial for these
cases to generate a libcall when optimising for minsize. On these 64-bit targets,
the 64-bits shifts are of course unaffected because the SHIFT/SHIFT_PARTS
lowering operation action is not set to custom/expand.


https://reviews.llvm.org/D57386

Files:
  lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  test/CodeGen/AArch64/shift_minsize.ll
  test/CodeGen/ARM/shift_minsize.ll
  test/CodeGen/X86/shift_minsize.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57386.184085.patch
Type: text/x-patch
Size: 12786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190129/665fb3c1/attachment.bin>


More information about the llvm-commits mailing list