[all-commits] [llvm/llvm-project] d0d12f: [InstCombine] Fold (X==Z) ? (Y==Z) : (!(Y==Z) && X...

Marina Taylor via All-commits all-commits at lists.llvm.org
Thu Oct 3 07:33:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d0d12fc78a3c552e6bf4158825d4917645911f6e
      https://github.com/llvm/llvm-project/commit/d0d12fc78a3c552e6bf4158825d4917645911f6e
  Author: Marina Taylor <marina_taylor at apple.com>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    A llvm/test/Transforms/InstCombine/icmp-equality-test.ll

  Log Message:
  -----------
  [InstCombine] Fold (X==Z) ? (Y==Z) : (!(Y==Z) && X==Y) --> X==Y (#108619)

This corresponds to the canonicalized form of some logic that was
seen in Swift-generated code for comparing optional pointers:
`(X==Z || Y==Z) ? (X==Z && Y==Z) : X==Y --> X==Y`
where `Z` was the constant `0`.

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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list