[all-commits] [llvm/llvm-project] ca4ed1: [PredicateInfo] Generalize processing of conditions

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jan 20 11:41:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ca4ed1e7aeebe21dc3952f84b408805ab17ad63f
      https://github.com/llvm/llvm-project/commit/ca4ed1e7aeebe21dc3952f84b408805ab17ad63f
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/PredicateInfo.cpp
    M llvm/test/Transforms/NewGVN/assume-equal.ll
    M llvm/test/Transforms/SCCP/conditions-ranges.ll
    M llvm/test/Transforms/Util/PredicateInfo/condprop.ll
    M llvm/test/Transforms/Util/PredicateInfo/testandor.ll

  Log Message:
  -----------
  [PredicateInfo] Generalize processing of conditions

Branch/assume conditions in PredicateInfo are currently handled in
a rather ad-hoc manner, with some arbitrary limitations. For example,
an `and` of two `icmp`s will be handled, but an `and` of an `icmp`
and some other condition will not. That also includes the case where
more than two conditions and and'ed together.

This patch makes the handling more general by looking through and/ors
up to a limit and considering all kinds of conditions (though operands
will only be taken for cmps of course).

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




More information about the All-commits mailing list