[all-commits] [llvm/llvm-project] b78306: [InstCombine] add tests for logical select xor fol...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Thu Oct 13 13:12:40 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b78306c9f718be9470984127e5b0b78c7ae634fe
      https://github.com/llvm/llvm-project/commit/b78306c9f718be9470984127e5b0b78c7ae634fe
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

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

  Log Message:
  -----------
  [InstCombine] add tests for logical select xor folds; NFC

issue #58313


  Commit: d85505a9323aadcfd3a34e9ba2e088a0d670b6bd
      https://github.com/llvm/llvm-project/commit/d85505a9323aadcfd3a34e9ba2e088a0d670b6bd
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

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

  Log Message:
  -----------
  [InstCombine] fold logical and/or to xor

(A | B) & ~(A & B) --> A ^ B

https://alive2.llvm.org/ce/z/qpFMns

We already have the equivalent fold for real
logic instructions, but this pattern may occur
with selects too.

This is part of solving issue #58313.


Compare: https://github.com/llvm/llvm-project/compare/572d5d374c98...d85505a9323a


More information about the All-commits mailing list