[PATCH] D29897: [BypassSlowDivision] Use ValueTracking to simplify run-time checks

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 19 10:17:33 PST 2017


jlebar added a comment.

When we see x/y, in addition to checking whether x and y are known "long", should we also check whether `x | y` is known-long?  This way if we saw something like:

  if (x | y & 0xffffffff00000000) return x / y;
  else return static_cast<int32_t>(x) / static_cast<int32_t>(y);

we wouldn't re-optimize this code.


https://reviews.llvm.org/D29897





More information about the llvm-commits mailing list