[PATCH] D149521: [InstCombine] Add folds for `(icmp spred (ssub.sat X, Y), 0)` -> `X spred Y`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 11:43:36 PDT 2023


nikic requested changes to this revision.
nikic added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3608
+      if (Pred == ICmpInst::ICMP_SLT && C.isOne())
+        return new ICmpInst(ICmpInst::ICMP_SLT, II->getArgOperand(0),
+                            II->getArgOperand(1));
----------------
Shouldn't this be sle?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149521



More information about the llvm-commits mailing list