[PATCH] D73200: GlobalISel: Add computeKnownBitsForTargetInstr

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 09:48:55 PDT 2020


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

LGTM after syncing up with @foad's change to use countLeadingOnes() in DAGISel



================
Comment at: llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp:434
+    if (NumBits > 1)
+      FirstAnswer = std::max(FirstAnswer, NumBits);
     break;
----------------
arsenm wrote:
> dsanders wrote:
> > Why update a variable that and return that rather than just returning the answer as per the other code paths?
> This is following the structure of the DAG implementation for eventually plugging in the default handling with computeKnownBits
Ok, that makes sense


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

https://reviews.llvm.org/D73200





More information about the llvm-commits mailing list