[PATCH] D116930: [DAGCombine] Fold SRA of a load into a narrower sign-extending load

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 04:35:07 PST 2022


bjope created this revision.
bjope added reviewers: RKSimon, samparker, nemanjai.
Herald added subscribers: ecnelises, pengfei, hiraditya.
bjope requested review of this revision.
Herald added a project: LLVM.

An sra is basically sign-extending a narrower value. Fold away the
shift by doing a sextload of a narrower value, when it is legal to
reduce the load width accordingly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116930

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/PowerPC/pr13891.ll
  llvm/test/CodeGen/X86/combine-sra-load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116930.398573.patch
Type: text/x-patch
Size: 5275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220110/f4fb02af/attachment.bin>


More information about the llvm-commits mailing list