[InstCombine] allow sinking fneg operands through an FP min/max
authorSanjay Patel <spatel@rotateright.com>
Tue, 7 May 2019 18:58:07 +0000 (18:58 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 7 May 2019 18:58:07 +0000 (18:58 +0000)
commit6a281a75450a23346bb24077c7e019183fe1d498
treeadc01ea1e2969656c7e366366b64d639f02be27d
parent102ec0977d17069812c505c4b1faae0266a34625
[InstCombine] allow sinking fneg operands through an FP min/max

Fundamentally/generally, we should not have to rely on bailouts/crippling of
folds. In this particular case, I think we always recognize the inverted
predicate min/max pattern, so there should not be any loss of optimization.
Codegen looks better because we are eliminating an fneg.

llvm-svn: 360180
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/minmax-fp.ll