[all-commits] [llvm/llvm-project] d3f1f7: [EarlyCSE] Use m_LogicalAnd/Or matchers to handle ...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Sun Dec 27 12:41:16 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d3f1f7b6bca585b76d40422e8076d59113e3bb80
      https://github.com/llvm/llvm-project/commit/d3f1f7b6bca585b76d40422e8076d59113e3bb80
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2020-12-28 (Mon, 28 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/EarlyCSE.cpp
    M llvm/test/Transforms/EarlyCSE/and_or.ll

  Log Message:
  -----------
  [EarlyCSE] Use m_LogicalAnd/Or matchers to handle branch conditions

EarlyCSE's handleBranchCondition says:

```
// If the condition is AND operation, we can propagate its operands into the
// true branch. If it is OR operation, we can propagate them into the false
// branch.
```

This holds for the corresponding select patterns as well.

This is a part of an ongoing work for disabling buggy select->and/or transformations.
See llvm.org/pr48353 and D93065 for more context

Proof:
and: https://alive2.llvm.org/ce/z/MQWodU
or: https://alive2.llvm.org/ce/z/9GLbB_

Reviewed By: nikic

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




More information about the All-commits mailing list