[all-commits] [llvm/llvm-project] 14ff38: [InstCombine] visitTrunc - trunc (lshr (sext A), C...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Sep 29 07:01:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 14ff38e235c4aec8e444d8aec26ce5d3a4c524d2
      https://github.com/llvm/llvm-project/commit/14ff38e235c4aec8e444d8aec26ce5d3a4c524d2
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-09-29 (Tue, 29 Sep 2020)

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

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

This came from @lebedev.ri's suggestion to use m_SpecificInt_ICMP for 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.

Differential Revision: https://reviews.llvm.org/D88475




More information about the All-commits mailing list