[all-commits] [llvm/llvm-project] b97093: [InstCombine] matchFunnelShift - fold or(shl(a, x), ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Oct 11 02:37:52 PDT 2020


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

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

  Log Message:
  -----------
  [InstCombine] matchFunnelShift - fold or(shl(a,x),lshr(b,sub(bw,x))) -> fshl(a,b,x) iff x < bw

If value tracking can confirm that a shift value is less than the type bitwidth then we can more confidently fold general or(shl(a,x),lshr(b,sub(bw,x))) patterns to a funnel/rotate intrinsic pattern without causing bad codegen regressions in the backend (see D89139).

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




More information about the All-commits mailing list