[all-commits] [llvm/llvm-project] 356d47: [ValueTracking] Handle and/or on RHS of isImpliedC...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon May 16 07:30:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 356d47ccb9b5f69b8b984d37a8b3c8813a84413b
      https://github.com/llvm/llvm-project/commit/356d47ccb9b5f69b8b984d37a8b3c8813a84413b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll
    M llvm/test/Transforms/InstSimplify/select-implied.ll
    M llvm/test/Transforms/LoopVectorize/induction.ll

  Log Message:
  -----------
  [ValueTracking] Handle and/or on RHS of isImpliedCondition()

isImpliedCondition() currently handles and/or on the LHS, but not
on the RHS, resulting in asymmetric behavior. This patch adds two
new implication rules:

 * LHS ==> (RHS1 || RHS2) if LHS ==> RHS1 or LHS ==> RHS2
 * LHS ==> !(RHS1 && RHS2) if LHS ==> !RHS1 or LHS ==> !RHS2

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




More information about the All-commits mailing list