[PATCH] D32692: [SelectionDAG] Use known ones to provide a better bound for the known zeros for CTTZ/CTLZ operations.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 06:02:12 PDT 2017


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

LGTM



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2386
+    unsigned PossibleTZ = Known2.One.countTrailingZeros();
+    unsigned LowBits = Log2_32(PossibleTZ)+1;
+    Known.Zero.setBitsFrom(LowBits);
----------------
clang-format?


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2395
+    unsigned PossibleLZ = Known2.One.countLeadingZeros();
+    unsigned LowBits = Log2_32(PossibleLZ)+1;
+    Known.Zero.setBitsFrom(LowBits);
----------------
clang-format?


https://reviews.llvm.org/D32692





More information about the llvm-commits mailing list