[PATCH] D118765: [DAGCombiner] Fold SSHLSAT/USHLSAT to SHL when no saturation will occur

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 02:37:19 PST 2022


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

When the shift amount is known and a known sign bit analysis of
the shiftee indicates that no saturation will occur, then we can
replace SSHLSAT/USHLSAT by SHL.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118765

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/sshl_sat.ll
  llvm/test/CodeGen/AArch64/ushl_sat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118765.405188.patch
Type: text/x-patch
Size: 5085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220202/9f853804/attachment.bin>


More information about the llvm-commits mailing list