[all-commits] [llvm/llvm-project] ecfe75: [InstCombine] Precommit tests for D101375 (NFC)

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Sun May 2 03:06:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecfe75eb74f00b3975c149247f6b08190023b1a3
      https://github.com/llvm/llvm-project/commit/ecfe75eb74f00b3975c149247f6b08190023b1a3
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-05-02 (Sun, 02 May 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/select-safe-transforms.ll

  Log Message:
  -----------
  [InstCombine] Precommit tests for D101375 (NFC)


  Commit: 39eb2665d979aed699f40b34a69c6c8d95333af3
      https://github.com/llvm/llvm-project/commit/39eb2665d979aed699f40b34a69c6c8d95333af3
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-05-02 (Sun, 02 May 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select-safe-transforms.ll

  Log Message:
  -----------
  [InstCombine] Add a few more patterns for folding select of select

This is a patch that folds select of select to salvage some optimizations after select -> and/or folding is disabled.

```
select (select a, true, b), c, false -> select a, c, false
select c, (select a, true, b), false -> select c, a, false
  if c implies that b is false (isImpliedCondition).
```
https://alive2.llvm.org/ce/z/ANatjt, https://alive2.llvm.org/ce/z/rv8zTB

```
sel (sel c, a, false), true, (sel !c, b, false) -> sel c, a, b
sel (sel !c, a, false), true, (sel c, b, false) -> sel c, b, a
```
https://alive2.llvm.org/ce/z/U2kp-t, https://alive2.llvm.org/ce/z/bc88EE

See D101191

Reviewed By: nikic

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


Compare: https://github.com/llvm/llvm-project/compare/a2b5314cbc10...39eb2665d979


More information about the All-commits mailing list