[PATCH] D66762: DAG: computeNumSignBits for MUL

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 11:35:42 PDT 2019


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

LG as a copy-paste from `lib/Analysis/ValueTracking.cpp` `ComputeNumSignBitsImpl()`.



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3723
+    unsigned SignBitsOp0 = ComputeNumSignBits(Op.getOperand(0), Depth + 1);
+    if (SignBitsOp0 == 1)
+      break;
----------------
`1` is a magic 'i-dont-know', right? I wonder why it's not `-1`,
that one you certainly can't ever get normally, unlike `1` (`INT_MIN`)
(Well, yeah, or `Optional<unsigned>`)


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

https://reviews.llvm.org/D66762





More information about the llvm-commits mailing list