[PATCH] D12706: Handle non-constant shifts in computeKnownBits, and use computeKnownBits for constant folding in InstCombine/Simplify

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 10:49:01 PDT 2015


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

LGTM w/minor comment addressed

Are you planning on implementing the follow on suggestions?  If not, we should make sure they get tracked either as TODOs or bugs.


================
Comment at: lib/Analysis/ValueTracking.cpp:990
@@ +989,3 @@
+
+  computeKnownBits(I->getOperand(1), KnownZero, KnownOne, DL, Depth + 1, Q);
+
----------------
It would be more clearly correct to use the two temporaries for this calculation.  The current code is correct, but slightly confusing.  


http://reviews.llvm.org/D12706





More information about the llvm-commits mailing list