[all-commits] [llvm/llvm-project] 68b24c: [CVP] Simplify comparisons without constant operand

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Nov 3 07:35:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68b24c3b448946f86586be6e66af64cdce6edadc
      https://github.com/llvm/llvm-project/commit/68b24c3b448946f86586be6e66af64cdce6edadc
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-11-03 (Thu, 03 Nov 2022)

  Changed paths:
    M llvm/lib/Analysis/LazyValueInfo.cpp
    M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
    M llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
    M llvm/test/Transforms/CorrelatedValuePropagation/mul.ll
    M llvm/test/Transforms/CorrelatedValuePropagation/shl.ll

  Log Message:
  -----------
  [CVP] Simplify comparisons without constant operand

CVP currently only tries to simplify comparisons if there is a
constant operand. However, even if both are non-constant, we may
be able to determine the result of the comparison based on range
information.

IPSCCP is already capable of doing this, but because it runs very
early, it may miss some cases.

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




More information about the All-commits mailing list