[PATCH] D32637: [KnownBits] Add methods to set and clear all bits.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 00:16:52 PDT 2017
craig.topper created this revision.
Herald added subscribers: nhaehnle, nemanjai, jyknight, arsenm.
This adds a clearAll and setAll method to KnownBits that call either clearAllBits or setAllBits on both.
We also still need methods to clear Zero/One and and set all bits in the opposite. I'm considering makeZero() and makeAllOnes(). As I'm writing this I'm wondering if clearAllBits should be makeUnknown. Not sure what setAll would be in that naming.
I'm worried about mixing the "clearing" a bit to unknown state vs making a bit known to be zero which would be consider clearing its value. I want to be able to treat KnownBits as a value so we can say is it known negative or nonnegative or zero or all ones. But I also want to be able to refer to its unknown/known set of bits.
https://reviews.llvm.org/D32637
Files:
lib/Analysis/ValueTracking.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/Sparc/SparcISelLowering.cpp
lib/Target/XCore/XCoreISelLowering.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32637.97056.patch
Type: text/x-patch
Size: 10258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170428/b0479996/attachment.bin>
More information about the llvm-commits
mailing list