[all-commits] [llvm/llvm-project] 52fac6: [InstCombine] Fold `[l|a]shr iN (X-1)&~X, N-1 -> ...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Fri Sep 6 06:38:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 52fac608bd3fb93caf08c137cea4591372aa8f31
      https://github.com/llvm/llvm-project/commit/52fac608bd3fb93caf08c137cea4591372aa8f31
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/ashr-lshr.ll

  Log Message:
  -----------
   [InstCombine] Fold `[l|a]shr iN (X-1)&~X, N-1 -> [z|s]ext(X==0)` (#107259)

Alive2: https://alive2.llvm.org/ce/z/kwvTFn
Closes #107228.

`ashr iN (X-1)&~X, N-1` also exists. See
https://github.com/dtcxzyw/llvm-opt-benchmark/issues/1274.



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