[all-commits] [llvm/llvm-project] 13f16f: [InstCombine] Canonicalize `(icmp eq/ne (and x, C)...

goldsteinn via All-commits all-commits at lists.llvm.org
Thu Jun 29 11:15:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13f16f4dea14a5efc4d471e02317b8ffb77a0896
      https://github.com/llvm/llvm-project/commit/13f16f4dea14a5efc4d471e02317b8ffb77a0896
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-eq-to-icmp-ule.ll
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
    M llvm/test/Transforms/InstCombine/icmp-logical.ll
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize `(icmp eq/ne (and x, C), x)` -> `(icmp eq/ne (and x, ~C), 0)`

This increases the likelyhood `x` is single-use and is typically
easier to analyze.

Proofs: https://alive2.llvm.org/ce/z/8ZpS2W

Reviewed By: nikic

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




More information about the All-commits mailing list