[all-commits] [llvm/llvm-project] 416e89: [Reland][InstCombine] Fold `icmp eq/ne min|max(X, ...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Mon Sep 25 00:47:27 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 416e891d6609d919211db7ab14149970ec49b0f6
https://github.com/llvm/llvm-project/commit/416e891d6609d919211db7ab14149970ec49b0f6
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2023-09-25 (Mon, 25 Sep 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/pr21199.ll
M llvm/test/Transforms/InstCombine/smax-icmp.ll
M llvm/test/Transforms/InstCombine/smin-icmp.ll
M llvm/test/Transforms/InstCombine/umax-icmp.ll
M llvm/test/Transforms/InstCombine/umin-icmp.ll
Log Message:
-----------
[Reland][InstCombine] Fold `icmp eq/ne min|max(X, Y), Z` (#67087)
This patch further improves the simplification of pattern `icmp eq/ne
min|max(X, Y), Z` as discussed in
[D156238](https://reviews.llvm.org/D156238).
When `X < Z`:
`min(X, Y) == Z -> false`
`min(X, Y) != Z -> true`
`max(X, Y) == Z -> Y == Z`
`max(Y, Z) != Z -> Y != Z`
When `X > Z`:
`max(X, Y) == Z -> false`
`max(X, Y) != Z -> true`
`min(X, Y) == Z -> Y == Z`
`min(Y, Z) != Z -> Y != Z`
Alive2: https://alive2.llvm.org/ce/z/evkmaq
More information about the All-commits
mailing list