[PATCH] D154206: [InstCombine] Fold comparison of usub.sat

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 11:37:53 PDT 2023


goldstein.w.n accepted this revision.
goldstein.w.n added a comment.
This revision is now accepted and ready to land.

LGTM. Since nikic was the primary review give him a few days to potentially add more feedback before pushing.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3494
+    // When c == 0, this simplifies to
+    // - usub.sat(a, b) == 0 ->  a <= b
+    // - usub.sat(a, b) != 0 -> a > b
----------------
nit: extra space before "a <= b" compared to below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154206



More information about the llvm-commits mailing list