[all-commits] [llvm/llvm-project] 7b07c0: [InstCombine] Support arbitrary const shift amount...

Anton Afanasyev via All-commits all-commits at lists.llvm.org
Fri Oct 15 03:51:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b07c01351407095d9822592e04b0d8233185584
      https://github.com/llvm/llvm-project/commit/7b07c01351407095d9822592e04b0d8233185584
  Author: Anton Afanasyev <anton.a.afanasyev at gmail.com>
  Date:   2021-10-15 (Fri, 15 Oct 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/lshr.ll
    M llvm/test/Transforms/PhaseOrdering/X86/pr52078.ll

  Log Message:
  -----------
  [InstCombine] Support arbitrary const shift amount for `lshr (sext i1 ...)`

Add lshr (sext i1 X to iN), C --> select (X, -1 >> C, 0) case. This expands
C == N-1 case to arbitrary C.

Fixes PR52078.

Reviewed By: spatel, RKSimon, lebedev.ri

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




More information about the All-commits mailing list