[llvm] [ValueTracking] Infer is-power-of-2 from assumptions. (PR #107745)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 8 12:03:58 PDT 2024


================
@@ -613,7 +613,7 @@ static bool isKnownNonZeroFromAssume(const Value *V, const SimplifyQuery &Q) {
     CmpInst::Predicate Pred;
     auto m_V = m_CombineOr(m_Specific(V), m_PtrToInt(m_Specific(V)));
     if (!match(I->getArgOperand(0), m_c_ICmp(Pred, m_V, m_Value(RHS))))
-      return false;
+      continue;
----------------
nikic wrote:

It would be good to add a more explicit test for this one.

https://github.com/llvm/llvm-project/pull/107745


More information about the llvm-commits mailing list