[all-commits] [llvm/llvm-project] 9d9633: [CVP] Simplify cmp of local phi node

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Feb 26 11:36:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d9633fb700d2c18b67b253a59145a543c6a37c4
      https://github.com/llvm/llvm-project/commit/9d9633fb700d2c18b67b253a59145a543c6a37c4
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-02-26 (Wed, 26 Feb 2020)

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

  Log Message:
  -----------
  [CVP] Simplify cmp of local phi node

CVP currently does not simplify cmps with instructions in the same
block, because LVI getPredicateAt() currently does not provide
much useful information for that case (D69686 would change that,
but is stuck.) However, if the instruction is a Phi node, then
LVI can compute the result of the predicate by threading it into
the predecessor blocks, which allows it simplify some conditions
that nothing else can handle. Relevant code:
https://github.com/llvm/llvm-project/blob/6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb/llvm/lib/Analysis/LazyValueInfo.cpp#L1904-L1927

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




More information about the All-commits mailing list