[llvm] Add known and demanded bits support for zext nneg (PR #70858)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 5 10:34:14 PST 2023


================
@@ -1103,6 +1103,9 @@ static void computeKnownBitsFromOperator(const Operator *I,
     assert(SrcBitWidth && "SrcBitWidth can't be zero");
     Known = Known.anyextOrTrunc(SrcBitWidth);
     computeKnownBits(I->getOperand(0), Known, Depth + 1, Q);
+    if (auto *Inst = dyn_cast<PossiblyNonNegInst>(I);
----------------
goldsteinn wrote:

nit; imo should move this statement to before the if and use `&&`. 

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


More information about the llvm-commits mailing list