[all-commits] [llvm/llvm-project] 973c7e: [InstCombine] Use different icmp pattern in test (...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue May 24 01:13:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 973c7e0654b21c6ae7093b4ea0362c6096945c38
      https://github.com/llvm/llvm-project/commit/973c7e0654b21c6ae7093b4ea0362c6096945c38
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-24 (Tue, 24 May 2022)

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

  Log Message:
  -----------
  [InstCombine] Use different icmp pattern in test (NFC)

Use an and/or of icmp pattern that produces different code
depending on whether it is part of a logical or bitwise and/or.


  Commit: c0e06c7448a2dd16796e210a66de68f269363e31
      https://github.com/llvm/llvm-project/commit/c0e06c7448a2dd16796e210a66de68f269363e31
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-24 (Tue, 24 May 2022)

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

  Log Message:
  -----------
  [InstCombine] Handle logical and/or in recursive and/or of icmps fold

The and/or of icmps fold is also applied in reassociated form.
However, this currently only happens for bitwise and of bitwise
and, but not for bitwise and of logical and (or other combinations,
but this is the one being addressed here).

We can do this for bitwise+logical combinations as well, but need
to be a bit careful about which of the resulting ands are logical:
https://alive2.llvm.org/ce/z/WYSjGh
https://alive2.llvm.org/ce/z/guxYnz
https://alive2.llvm.org/ce/z/S5SYxY
https://alive2.llvm.org/ce/z/2rAWeW


Compare: https://github.com/llvm/llvm-project/compare/bb8e02325ffc...c0e06c7448a2


More information about the All-commits mailing list