[all-commits] [llvm/llvm-project] 0af42d: [PatternMatch][LVI] Handle select-form and/or in LVI

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Dec 27 08:41:23 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0af42d3dc73e8f08e37811131c31358ecb9adf20
      https://github.com/llvm/llvm-project/commit/0af42d3dc73e8f08e37811131c31358ecb9adf20
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-12-27 (Sun, 27 Dec 2020)

  Changed paths:
    M llvm/include/llvm/IR/PatternMatch.h
    M llvm/lib/Analysis/LazyValueInfo.cpp
    M llvm/test/Transforms/CorrelatedValuePropagation/basic.ll

  Log Message:
  -----------
  [PatternMatch][LVI] Handle select-form and/or in LVI

Following the discussion in D93065, this adds m_LogicalAnd() and
m_LogicalOr() matchers, that match A && B and A || B logical
operations, either as bitwise operations or select expressions.
As an example usage, LVI is adapted to use these matchers for its
condition reasoning.

The plan here is to switch other parts of LLVM that reason about
and/or of conditions to also support the select forms, and then
merge D93065 (or a variant thereof) to disable the poison-unsafe
select to and/or transform.

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




More information about the All-commits mailing list