[PATCH] D38514: [InstCombine] improve folds for icmp gt/lt (shr X, C1), C2

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 06:30:01 PDT 2017


spatel added a comment.

In https://reviews.llvm.org/D38514#887862, @craig.topper wrote:

> I think this changes behavior of the current code with "exact" shifts. Did we not have tests for that?


Nice catch - let me add some handling for that. And no, there are no tests that expose the difference (there's only one candidate 'exact.ll' test for this fold currently, but the constant didn't wiggle). Before https://reviews.llvm.org/rL314837, you could have completely bogus logic for the fold (because I did of course) and not break anything.


https://reviews.llvm.org/D38514





More information about the llvm-commits mailing list