[PATCH] D83139: [InstCombine] Always try to invert non-canonical predicate of an icmp

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 4 07:31:48 PDT 2020


spatel added a comment.

In D83139#2131285 <https://reviews.llvm.org/D83139#2131285>, @nikic wrote:

> LG from my side, but would be great if @spatel can chime in as well. We generally avoid folds that inspect users of an instruction, but I think there's reasonable motivation here. It would be great if you can provide your original test case that shows the missed CSE opportunity, as a sanity check that this can't be solved in some other way.


LGTM too. If you can pre/post-commit the value name change diffs in the tests, that would make it much easier to see the true diffs.
I looked at doing something like this somewhere in the past, but I was too scared of the infinite loop potential, especially for min/max patterns (intrinsics coming soon?). So watch out for fallout from fuzzers and bots.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83139/new/

https://reviews.llvm.org/D83139





More information about the llvm-commits mailing list