[PATCH] D98299: [InstSimplify] Simplify smul.fix and smul.fix.sat

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 15:15:04 PST 2021


bjope created this revision.
bjope added reviewers: nikic, spatel.
Herald added a subscriber: hiraditya.
bjope requested review of this revision.
Herald added a project: LLVM.

Add simplification of smul.fix and smul.fix.sat according to

  X * 0 -> 0
  X * undef -> 0
  X * (1 << scale) -> X

This includes the commuted patterns and splatted vectors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98299

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstSimplify/smul_fix.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98299.329485.patch
Type: text/x-patch
Size: 7728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210309/29fdaf69/attachment.bin>


More information about the llvm-commits mailing list