[all-commits] [llvm/llvm-project] a088be: Add baseline tests for D147597

Jun Zhang via All-commits all-commits at lists.llvm.org
Thu Apr 13 02:27:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a088beaef21badc91806329941113f097cdeb62c
      https://github.com/llvm/llvm-project/commit/a088beaef21badc91806329941113f097cdeb62c
  Author: Jun Zhang <jun at junz.org>
  Date:   2023-04-13 (Thu, 13 Apr 2023)

  Changed paths:
    M llvm/test/Transforms/InstCombine/icmp.ll

  Log Message:
  -----------
  Add baseline tests for D147597

Signed-off-by: Jun Zhang <jun at junz.org>


  Commit: e3175f7f1b55a38e9ab845ca26f0c4343ee2f7ff
      https://github.com/llvm/llvm-project/commit/e3175f7f1b55a38e9ab845ca26f0c4343ee2f7ff
  Author: Jun Zhang <jun at junz.org>
  Date:   2023-04-13 (Thu, 13 Apr 2023)

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

  Log Message:
  -----------
  [InstCombine] icmp(X | OrC, C) --> icmp(X, 0)

We can eliminate the or operation based on the predicate and the
relation between OrC and C.

sge: X | OrC s>= C --> X s>= 0 iff OrC s>= C s>= 0
sgt: X | OrC s>  C --> X s>= 0 iff OrC s>  C s>= 0
sle: X | OrC s<= C --> X s<  0 iff OrC s>  C s>= 0
slt: X | OrC s<  C --> X s<  0 iff OrC s>= C s>= 0

Alive2 links:
sge: https://alive2.llvm.org/ce/z/W-6FHE
sgt: https://alive2.llvm.org/ce/z/TKK2yJ
sle: https://alive2.llvm.org/ce/z/vURQGM
slt: https://alive2.llvm.org/ce/z/JAsVfw

Related issue: https://github.com/llvm/llvm-project/issues/61538

Signed-off-by: Jun Zhang <jun at junz.org>

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


Compare: https://github.com/llvm/llvm-project/compare/a2e596bdf8cc...e3175f7f1b55


More information about the All-commits mailing list