[all-commits] [llvm/llvm-project] c913dc: [SCEV] Use lshr in implications

Max Kazantsev via All-commits all-commits at lists.llvm.org
Mon Jan 24 22:25:50 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c913dccfde69617e2357ac25532f25d2a81bca2c
      https://github.com/llvm/llvm-project/commit/c913dccfde69617e2357ac25532f25d2a81bca2c
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2022-01-25 (Tue, 25 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/ScalarEvolution.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Transforms/IndVarSimplify/shift-range-checks.ll

  Log Message:
  -----------
  [SCEV] Use lshr in implications

This patch adds support for implication inference logic for the
following pattern:
```
  lhs < (y >> z) <= y, y <= rhs --> lhs < rhs
```
We should be able to use the fact that value shifted to right is
not greater than the original value (provided it is non-negative).

Differential Revision: https://reviews.llvm.org/D116150
Reviewed-By: apilipenko




More information about the All-commits mailing list