[PATCH] D118603: [DAGCombine] Add simple folds for SSHLSAT/USHLSAT

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 05:42:10 PST 2022


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

Do "simplifyShift" and "FoldConstantArithmetic" folds for the SSHLSAT
and USHLSAT DAG nodes.

This for example include folds such as:

  (shlsat 0, x) -> 0
  (shlsat x, 0) -> x
  (shlsat c1, c2) -> c3


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118603

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118603.404494.patch
Type: text/x-patch
Size: 7295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/a7ab30f5/attachment.bin>


More information about the llvm-commits mailing list