Compare two values, and if they are different, return the position of the
most significant bit that is different in the values.
Needed for D69387.
Paths
| Differential D69439
[APInt] Introduce APIntOps::GetPositionOfMostSignificantDifferentBit() ClosedPublic Authored by lebedev.ri on Oct 25 2019, 11:03 AM.
Details
Diff Detail
Event Timelinelebedev.ri added a child revision: D69387: [ConstantRange] Add toKnownBits() method.Oct 25 2019, 11:03 AM
Comment Actions LGTM, though I'd suggest a more compact name.
This revision is now accepted and ready to land.Oct 26 2019, 8:51 AM Comment Actions Thank you for the review! Closed by commit rG9d77ad57540c: [APInt] Introduce APIntOps::GetMostSignificantDifferentBit() (authored by lebedev.ri). · Explain WhyOct 26 2019, 1:23 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 226471 llvm/include/llvm/ADT/APInt.h
llvm/lib/Support/APInt.cpp
llvm/unittests/ADT/APIntTest.cpp
|
The name seems a bit excessive -- I think GetMostSignificantDifferingBit would have the same information content.