[all-commits] [llvm/llvm-project] 45ecfe: [CVP] Remove ashr of -1 or 0

FabianWolff via All-commits all-commits at lists.llvm.org
Mon Nov 29 15:36:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 45ecfed6c636d06f76bca0a44803e945cdae9506
      https://github.com/llvm/llvm-project/commit/45ecfed6c636d06f76bca0a44803e945cdae9506
  Author: Fabian Wolff <fabian.wolff at alumni.ethz.ch>
  Date:   2021-11-29 (Mon, 29 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
    M llvm/test/Transforms/CorrelatedValuePropagation/ashr.ll

  Log Message:
  -----------
  [CVP] Remove ashr of -1 or 0

Fixes PR#52190. There is already a check for converting ashr instructions with non-negative left-hand sides into lshr; this patch adds an optimization to remove ashr altogether if the left-hand side is known to be in the range [-1, 1).

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




More information about the All-commits mailing list