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

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 15:30:59 PDT 2015

hfinkel added a comment.

Roman Divacky asked on IRC about statistics from self-hosting. Here are some:

During a self-host (PPC64/Linux - LLVM + Clang + compiler-rt), computeKnownBits returns non-trivial results for shifts with dynamic shift amounts:

  shl - About 350k times
  lshr - About 9k times
  ashr - About 125 times

And the logic that constant-folds values when we know all of the bits, fires:

  InstSimplify - About 3.5k times
  InstCombine - About 2k times



More information about the llvm-commits mailing list