[InstCombine] add min/max intrinsics as freely invertible candidates
authorSanjay Patel <spatel@rotateright.com>
Wed, 18 Aug 2021 22:45:51 +0000 (18:45 -0400)
committerSanjay Patel <spatel@rotateright.com>
Thu, 19 Aug 2021 12:41:38 +0000 (08:41 -0400)
commiteee0ded3371f549ba6df045c0348e8e32d576df9
tree7f9a9459a74cc2214a81657e8abef80be1fcaebd
parent610d3d512aad6f737e932d31c1a207f0a58cd0c0
[InstCombine] add min/max intrinsics as freely invertible candidates

In the optimized test, we are able to peak through the
min/max that has 2 min/max operands and invert them all:
https://alive2.llvm.org/ce/z/7gYMN5
llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/minmax-intrinsics.ll