[PATCH] D32376: [ValueTracking] Introduce a KnownBits struct to wrap the two APInts for computeKnownBits
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 08:54:04 PDT 2017
craig.topper added a comment.
I considered adding KnownBits.h to ValueTracking.h, but I wasn't sure if we wanted to drag APInt.h into every file thjat included ValueTracking.h since there is other entry points in ValueTracking.h that do not use KnownBits.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:2884
+ computeKnownBits(I, Known, /*Depth*/0, I);
+ if ((Known.Zero | Known.One).isAllOnesValue()) {
+ Constant *C = ConstantInt::get(Ty, Known.One);
----------------
RKSimon wrote:
> KnownBits helper
Prefer to leave to a future patch.
https://reviews.llvm.org/D32376
More information about the llvm-commits
mailing list