[PATCH] D129726: [InstCombine] (ShiftValC >> Y) >s -1/<s 0 --> Y != 0/==0

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 06:26:53 PDT 2022


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

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:2246
+    if (!IsAShr && ShiftValC->isNegative() &&
+        InstCombiner::isSignBitCheck(Pred, C, TrueIfSigned))
+      return new ICmpInst(TrueIfSigned ? CmpInst::ICMP_EQ : CmpInst::ICMP_NE,
----------------
We are inside of the "InstCombiner" namespace, so there is no reason to specify "InstCombiner::" explicitly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129726



More information about the llvm-commits mailing list