[all-commits] [llvm/llvm-project] 701923: [InstCombine] add tests for bitwise logic folds; NFC

RotateRight via All-commits all-commits at lists.llvm.org
Mon Nov 1 05:48:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 701923a60fdb7b321cfd8e6ff5d5d9195daaec0e
      https://github.com/llvm/llvm-project/commit/701923a60fdb7b321cfd8e6ff5d5d9195daaec0e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/and-or.ll
    M llvm/test/Transforms/InstCombine/or.ll

  Log Message:
  -----------
  [InstCombine] add tests for bitwise logic folds; NFC

The extra uses are needed to prevent intermediate folds.
Without that, there would be no coverage currently.
The vector tests show an artificial limitation in the code.


  Commit: 511ee8759f714a8bd17f8669ecc0022e07eb2362
      https://github.com/llvm/llvm-project/commit/511ee8759f714a8bd17f8669ecc0022e07eb2362
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

  Log Message:
  -----------
  [InstCombine] reduce code duplication with commutative matcher; NFC


  Commit: 54e969cffddb2fbe555c65c0275b4f5accc6906c
      https://github.com/llvm/llvm-project/commit/54e969cffddb2fbe555c65c0275b4f5accc6906c
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and-or.ll

  Log Message:
  -----------
  [InstCombine] allow vector splat matching for bitwise logic folds

This fold was added long ago (part of fixing PR4216),
and it matched scalars only. Intermediate folds have
been added subsequently, so extra uses are required
to exercise this code.

General proof:
https://alive2.llvm.org/ce/z/G6BBhB

One of the specific tests:
https://alive2.llvm.org/ce/z/t0JhEB


Compare: https://github.com/llvm/llvm-project/compare/ce12e68a4944...54e969cffddb


More information about the All-commits mailing list