[all-commits] [llvm/llvm-project] 6d8396: [InstCombine] Canonicalize (A & B_Pow2) eq/ne B_Po...

goldsteinn via All-commits all-commits at lists.llvm.org
Mon Jan 9 03:48:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d839621da8d0d85552c741c4c72369b4ada97c4
      https://github.com/llvm/llvm-project/commit/6d839621da8d0d85552c741c4c72369b4ada97c4
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-and-shift.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize (A & B_Pow2) eq/ne B_Pow2 patterns

1. A & B_Pow2 != B_Pow2 -> A & B_Pow2 == 0
   https://alive2.llvm.org/ce/z/KVUej4

2. A & B_Pow2 == B_Pow2 -> A & B_Pow2 != 0
   https://alive2.llvm.org/ce/z/PVv9FR

This allows the patterns to more easily be analyzed elsewhere.

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




More information about the All-commits mailing list