[PATCH] D32931: [KnownBits] Add bit counting methods to KnownBits struct and use them where possible

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 20:43:23 PDT 2017


craig.topper created this revision.
Herald added subscribers: nhaehnle, mzolotukhin, arsenm.

This patch adds min/max population count, leading/trailing zero/one bit counting methods.

The min methods return answers based on bits that are known without considering unknown bits. The max methods give answers taking into account the largest count that unknown bits could give.


https://reviews.llvm.org/D32931

Files:
  include/llvm/Support/KnownBits.h
  lib/Analysis/DemandedBits.cpp
  lib/Analysis/InstructionSimplify.cpp
  lib/Analysis/ScalarEvolution.cpp
  lib/Analysis/ValueTracking.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/XCore/XCoreISelLowering.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp
  lib/Transforms/Utils/BypassSlowDivision.cpp
  lib/Transforms/Utils/Local.cpp
  lib/Transforms/Vectorize/LoadStoreVectorizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32931.98047.patch
Type: text/x-patch
Size: 26146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170506/dadcc944/attachment.bin>


More information about the llvm-commits mailing list