[PATCH] D109959: [SCEV] Generalize implication when signedness of FoundPred doesn't matter

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 21:06:09 PDT 2021


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10711
+    return (CmpInst::isUnsigned(P2) && P1 == CmpInst::getSignedPredicate(P2)) ||
+           (CmpInst::isSigned(P2) && P1 == CmpInst::getUnsignedPredicate(P2));
+  };
----------------
nikic wrote:
> You should be able to simply this to `CmpInst::isRelational(P2) && P1 == CmpInst::getFlippedSignednessPredicate(P2)`.
That's a good point, thanks!


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

https://reviews.llvm.org/D109959



More information about the llvm-commits mailing list