[PATCH] D88475: [InstCombine] visitTrunc - trunc (lshr (sext A), C) --> (ashr A, C) non-uniform support

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 03:22:12 PDT 2020


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

This came from @lebedev.ri's suggestion to use m_SpecificInt_ICMP for D88429 <https://reviews.llvm.org/D88429> - since I was going to change the m_APInt to m_Constant for that patch I thought I would do it for the only other user of the APInt first.

I've added a ConstantExpr::getUMin helper - its trivial to add UMAX/SMIN/SMAX but thought I'd wait until we have use cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88475

Files:
  llvm/include/llvm/IR/Constants.h
  llvm/lib/IR/Constants.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  llvm/test/Transforms/InstCombine/cast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88475.294920.patch
Type: text/x-patch
Size: 4832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200929/18eff542/attachment.bin>


More information about the llvm-commits mailing list