[PATCH] D47891: [InstSimplify] shl nuw %x, %y -> %x iff KnownBits says %x is negative.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 09:51:04 PDT 2018


spatel added a subscriber: efriedma.
spatel added a comment.

I think we need to make a compile-time vs. perf win assessment on this one. This is probably true for any proposal that uses knownbits analysis in InstSimplify at this point. @efriedma said something that stuck with me in 1 of my proposals a while back: we could use knownbits on *every* value in instsimplify, but that would be very expensive and wouldn't gain much perf.

So I'd like to see debug STATISTICs for this fold to see how often we have 'shl nuw' in real code and how often this fires. Test-suite or compiling clang/llvm itself should be reasonable benchmarks.


Repository:
  rL LLVM

https://reviews.llvm.org/D47891





More information about the llvm-commits mailing list