[PATCH] D62857: [RISCV] Prevent hoisting some adds after shifts
    Sam Elliott via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jun  4 07:07:03 PDT 2019
    
    
  
lenary created this revision.
lenary added reviewers: asb, luismarques, efriedma.
Herald added subscribers: llvm-commits, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar, hiraditya.
Herald added a project: LLVM.
On RISC-V, materialising the large (shifted) constant produced for the
new add uses an extra register, and takes several instructions. It is
more efficient to perform the add before the shift if the constant to be
added fits into an immediate.
This is potentially useful to other targets, and might in future be done
within the target-independent part of DAGCombine.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D62857
Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/add-before-shl.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62857.202931.patch
Type: text/x-patch
Size: 4175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190604/f444b65a/attachment.bin>
    
    
More information about the llvm-commits
mailing list