[PATCH] D156238: [InstCombine] Generalize foldICmpWithMinMax

Yingwei Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 26 06:53:14 PDT 2023


dtcxzyw marked 4 inline comments as done.
dtcxzyw added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5003
+    //   X == Z       min(X, Y) == Z       X <= Y
+    //   X == Z       max(X, Y) == Z       X >= Y
+    //   X != Z       min(X, Y) == Z   X > Y && Y == Z // nofold
----------------
goldstein.w.n wrote:
> Think you mean `Y == Z` here?
It is `X == Z`. It just checks the value of `CmpXZ` and then folds the expr.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156238/new/

https://reviews.llvm.org/D156238



More information about the llvm-commits mailing list