[all-commits] [llvm/llvm-project] 261467: [InstCombine] Fold ((cst << x) & 1) --> x == 0 whe...

elhewaty via All-commits all-commits at lists.llvm.org
Mon Feb 5 07:28:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2614672cc12258d2b07db2657e475ad70e01d5ba
      https://github.com/llvm/llvm-project/commit/2614672cc12258d2b07db2657e475ad70e01d5ba
  Author: elhewaty <mohamedatef1698 at gmail.com>
  Date:   2024-02-05 (Mon, 05 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and.ll

  Log Message:
  -----------
  [InstCombine] Fold ((cst << x) & 1) --> x == 0 when cst is odd (#79772)

Fold ((cst << x) & 1) to zext(x == 0) when cst is odd.

Fixes: https://github.com/llvm/llvm-project/issues/73384
Alive2: https://alive2.llvm.org/ce/z/5RbaK6




More information about the All-commits mailing list