[all-commits] [llvm/llvm-project] 310f62: [InstCombine] narrowFunnelShift - fold trunc/zext ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Oct 24 04:43:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 310f62b4ff3ecb67cf696a977b194cceb326fa43
      https://github.com/llvm/llvm-project/commit/310f62b4ff3ecb67cf696a977b194cceb326fa43
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/funnel.ll

  Log Message:
  -----------
  [InstCombine] narrowFunnelShift - fold trunc/zext or(shl(a,x),lshr(b,sub(bw,x))) -> fshl(a,b,x) (PR35155)

As discussed on PR35155, this extends narrowFunnelShift (recently renamed from narrowRotate) to support basic funnel shift patterns.

Unlike matchFunnelShift we don't include the computeKnownBits limitation as extracting the pattern from the zext/trunc layers should be a indicator of reasonable funnel shift codegen, in D89139 we demonstrated how to efficiently promote funnel shifts to wider types.

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




More information about the All-commits mailing list