[PATCH] D143363: [ValueTracking] Search dominate condition to check if a value is pow2 or not

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 18:27:11 PST 2023


bcl5980 added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2274
+      // dominate condition popcount(v) < 2, v is pow2 or 0
+      if (OrZero && Pred == CmpInst::ICMP_ULT && *CmpConst == 2)
+        return true;
----------------
StephenFan wrote:
> It seems it is no test coveraged here.
I think @known_power_of_two_urem_dominate_y_and_yminus1_eq_0 already covered it.


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

https://reviews.llvm.org/D143363



More information about the llvm-commits mailing list