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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 12:20:49 PDT 2021


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10711
+    return (CmpInst::isUnsigned(P2) && P1 == CmpInst::getSignedPredicate(P2)) ||
+           (CmpInst::isSigned(P2) && P1 == CmpInst::getUnsignedPredicate(P2));
+  };
----------------
You should be able to simply this to `CmpInst::isRelational(P2) && P1 == CmpInst::getFlippedSignednessPredicate(P2)`.


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

https://reviews.llvm.org/D109959



More information about the llvm-commits mailing list