[PATCH] D38531: Improve clamp recognition in ValueTracking.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 18:58:09 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:1331
+  Value *A = nullptr, *B = nullptr;
+  if (C->isNullValue() && Pred == ICmpInst::ICMP_SGT) {
+    SelectPatternResult SPR = matchSelectPattern(X, A, B);
----------------
Slightly more general transform:

https://rise4fun.com/Alive/AKv

In any case, this should probably be a separate patch.


https://reviews.llvm.org/D38531





More information about the llvm-commits mailing list