[PATCH] D142546: [ConstraintElimination] Decompose or instruction if the constant operand < 2^known_zero_bits of the first operand.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 00:38:12 PST 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:351
+  if (match(V, m_Or(m_Value(Op0), m_ConstantInt(CI)))) {
+    auto KnownBits = computeKnownBits(Op0, DL, MaxAnalysisRecursionDepth - 1);
+    if (CI->getZExtValue() < pow(2, KnownBits.Zero.getZExtValue()))
----------------
You're looking for haveNoCommonBitsSet().


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142546



More information about the llvm-commits mailing list